From 202a1a1b9f07994138de669f4d8b42b4c0bddcc2 Mon Sep 17 00:00:00 2001 From: Kurt Jung Date: Sat, 12 Apr 2014 10:04:02 -0400 Subject: Ivan Daniluk's patch to compress images more quickly. --- util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() -- cgit v1.2.1-24-ge1ad