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/include/types/compression.h b/include/types/compression.h
index 6f418fa..097c42c 100644
--- a/include/types/compression.h
+++ b/include/types/compression.h
@@ -44,7 +44,7 @@
struct comp_algo {
char *name;
int name_len;
- int (*init)(struct comp_ctx *comp_ctx, int);
+ int (*init)(struct comp_ctx *comp_ctx, int level);
int (*add_data)(struct comp_ctx *comp_ctx, const char *in_data, int in_len, char *out_data, int out_len);
int (*flush)(struct comp_ctx *comp_ctx, struct buffer *out, int flag);
int (*reset)(struct comp_ctx *comp_ctx);
diff --git a/include/types/global.h b/include/types/global.h
index 28632b7..2f41be5 100644
--- a/include/types/global.h
+++ b/include/types/global.h
@@ -112,6 +112,10 @@
#ifdef USE_OPENSSL
int sslcachesize; /* SSL cache size in session, defaults to 20000 */
#endif
+#ifdef USE_ZLIB
+ int zlibmemlevel; /* zlib memlevel */
+ int zlibwindowsize; /* zlib window size */
+#endif
} tune;
struct {
char *prefix; /* path prefix of unix bind socket */