MINOR: compression: optimize memLevel to improve byte rate
Decreasing the deflateInit2's memLevel parameter from 9 to 8 does not
affect the compression ratio and increases the compression speed by 12%.
Lower values do not increase transfer speed but decrease the compression
ratio so it looks like 8 is optimal.
diff --git a/src/compression.c b/src/compression.c
index 87449ac..45244a0 100644
--- a/src/compression.c
+++ b/src/compression.c
@@ -317,7 +317,7 @@
strm->zfree = Z_NULL;
strm->opaque = Z_NULL;
- if (deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS + 16, 9, Z_DEFAULT_STRATEGY) != Z_OK)
+ if (deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS + 16, 8, Z_DEFAULT_STRATEGY) != Z_OK)
return -1;
return 0;