aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/vbatts/tar-split/tar/storage/getter.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/vbatts/tar-split/tar/storage/getter.go')
-rw-r--r--vendor/github.com/vbatts/tar-split/tar/storage/getter.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/vendor/github.com/vbatts/tar-split/tar/storage/getter.go b/vendor/github.com/vbatts/tar-split/tar/storage/getter.go
index ae11f8ffd..9fed24aa8 100644
--- a/vendor/github.com/vbatts/tar-split/tar/storage/getter.go
+++ b/vendor/github.com/vbatts/tar-split/tar/storage/getter.go
@@ -92,11 +92,12 @@ func NewDiscardFilePutter() FilePutter {
}
type bitBucketFilePutter struct {
+ buffer [32 * 1024]byte // 32 kB is the buffer size currently used by io.Copy, as of August 2021.
}
func (bbfp *bitBucketFilePutter) Put(name string, r io.Reader) (int64, []byte, error) {
c := crc64.New(CRCTable)
- i, err := io.Copy(c, r)
+ i, err := io.CopyBuffer(c, r, bbfp.buffer[:])
return i, c.Sum(nil), err
}