Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cb6d711

Browse files
committed
Fix gzip does not compress data by default, but increases the amount of data.
1 parent a944ce0 commit cb6d711

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

โ€Žutil/compress.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var (
1515

1616
func init() {
1717
spWriter = sync.Pool{New: func() interface{} {
18-
return new(gzip.Writer)
18+
return gzip.NewWriter(nil)
1919
}}
2020
spReader = sync.Pool{New: func() interface{} {
2121
return new(gzip.Reader)

0 commit comments

Comments
ย (0)