func NewPooledBufferedWriterReadFromProvider(size int) *PooledBufferedReadFromProvider {
	if size < int(32*sdkio.KibiByte) {
		size = int(64 * sdkio.KibiByte)
	}
	return &PooledBufferedReadFromProvider{
		pool: sync.Pool{
			New: func() interface{} {
				return &bufferedReadFrom{bufferedWriter: bufio.NewWriterSize(nil, size)}
			},
		},
	}
}
NewPooledBufferedWriterReadFromProvider returns a new PooledBufferedReadFromProvider
Size is used to control the size of the underlying *bufio.Writer created for
calls to GetReadFrom.
package s3manager
import (
	"bufio"
	"io"
	"sync"
	"github.com/aws/aws-sdk-go/internal/sdkio"
)
type WriterReadFrom interface {
	io.Writer
	io.ReaderFrom
}
type WriterReadFromProvider interface {
	GetReadFrom(writer io.Writer) (w WriterReadFrom, cleanup func())
}
type bufferedWriter interface {
	WriterReadFrom
	Flush() error
	Reset(io.Writer)
}
type bufferedReadFrom struct {
	bufferedWriter
}
func (b *bufferedReadFrom) ReadFrom(r io.Reader) (int64, error) {
	n, err := b.bufferedWriter.ReadFrom(r)
	if flushErr := b.Flush(); flushErr != nil && err == nil {
		err = flushErr
	}
	return n, err
}
type PooledBufferedReadFromProvider struct {
	pool sync.Pool
}