summaryrefslogtreecommitdiff
path: root/util.go
diff options
context:
space:
mode:
Diffstat (limited to 'util.go')
-rw-r--r--util.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.go b/util.go
index 96ffd9b..22604bd 100644
--- a/util.go
+++ b/util.go
@@ -69,7 +69,7 @@ func bufferFromReader(r io.Reader) (b *bytes.Buffer, err error) {
// Returns a zlib-compressed copy of the specified byte array
func sliceCompress(data []byte) []byte {
var buf bytes.Buffer
- cmp := zlib.NewWriter(&buf)
+ cmp, _ := zlib.NewWriterLevel(&buf, zlib.BestSpeed)
cmp.Write(data)
cmp.Close()
return buf.Bytes()