func NewDownloader(c client.ConfigProvider, options ...func(*Downloader)) *Downloader {
	return newDownloader(s3.New(c), options...)
}
NewDownloader creates a new Downloader instance to downloads objects from
S3 in concurrent chunks. Pass in additional functional options  to customize
the downloader behavior. Requires a client.ConfigProvider in order to create
a S3 service client. The session.Session satisfies the client.ConfigProvider
interface.

Example:
// The session the S3 Downloader will use
sess := session.Must(session.NewSession())

// Create a downloader with the session and default options
downloader := s3manager.NewDownloader(sess)

// Create a downloader with the session and custom options
downloader := s3manager.NewDownloader(sess, func(d *s3manager.Downloader) {
d.PartSize = 64 * 1024 * 1024 // 64MB per part
})
package s3manager
import (
	"fmt"
	"io"
	"net/http"
	"strconv"
	"strings"
	"sync"
	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/awsutil"
	"github.com/aws/aws-sdk-go/aws/client"
	"github.com/aws/aws-sdk-go/aws/request"
	"github.com/aws/aws-sdk-go/service/s3"
	"github.com/aws/aws-sdk-go/service/s3/s3iface"
)
const DefaultDownloadPartSize = 1024 * 1024 * 5
const DefaultDownloadConcurrency = 5
type errReadingBody struct {
	err error
}
func (e *errReadingBody) Error() string {
	return fmt.Sprintf("failed to read part body: %v", e.err)
}
func (e *errReadingBody) Unwrap() error {
	return e.err
}
type Downloader struct {
	PartSize int64
	Concurrency int
	S3 s3iface.S3API
	RequestOptions []request.Option
	BufferProvider WriterReadFromProvider
}
func WithDownloaderRequestOptions(opts ...request.Option) func(*Downloader) {
	return func(d *Downloader) {
		d.RequestOptions = append(d.RequestOptions, opts...)
	}
}