MINOR: compression: memlevel and windowsize
The window size and the memlevel of the zlib are now configurable using
global options tune.zlib.memlevel and tune.zlib.windowsize.
It affects the memory consumption of the zlib.
diff --git a/src/compression.c b/src/compression.c
index 1f12df9..c20a449 100644
--- a/src/compression.c
+++ b/src/compression.c
@@ -329,7 +329,7 @@
strm->zfree = Z_NULL;
strm->opaque = Z_NULL;
- if (deflateInit2(&comp_ctx->strm, level, Z_DEFLATED, MAX_WBITS + 16, 8, Z_DEFAULT_STRATEGY) != Z_OK)
+ if (deflateInit2(&comp_ctx->strm, level, Z_DEFLATED, global.tune.zlibwindowsize + 16, global.tune.zlibmemlevel, Z_DEFAULT_STRATEGY) != Z_OK)
return -1;
return 0;