Skip to content

Commit

Permalink
fix(compress): set default copy buffer to 1 MiB
Browse files Browse the repository at this point in the history
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
  • Loading branch information
rchincha committed Oct 25, 2023
1 parent bb9c746 commit 89a7ea1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/system/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
func Copy(dst io.Writer, src io.Reader) (int64, error) {
// Make a buffer so io.Copy doesn't make one for each iteration.
var buf []byte
size := 32 * 1024
size := 256 << 12 // 1 MiB
if lr, ok := src.(*io.LimitedReader); ok && lr.N < int64(size) {
if lr.N < 1 {
size = 1
Expand Down

0 comments on commit 89a7ea1

Please sign in to comment.