Commit 78055b56 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp Committed by Tollef Fog Heen

Make all three gzip parameter varnish parameters: gzip_level,

gzip_window and gzip_memlevel.

Still same pessimal values though.
parent b96c0af7
...@@ -202,8 +202,8 @@ VGZ_NewGzip(struct sess *sp, const char *id) ...@@ -202,8 +202,8 @@ VGZ_NewGzip(struct sess *sp, const char *id)
i = deflateInit2(&vg->vz, i = deflateInit2(&vg->vz,
params->gzip_level, /* Level */ params->gzip_level, /* Level */
Z_DEFLATED, /* Method */ Z_DEFLATED, /* Method */
16 + 8, /* Window bits (16=gzip + 15) */ 16 + params->gzip_window, /* Window bits (16=gzip + 15) */
1, /* memLevel */ params->gzip_memlevel, /* memLevel */
Z_DEFAULT_STRATEGY); Z_DEFAULT_STRATEGY);
if (i != Z_OK) if (i != Z_OK)
printf("deflateInit2() = %d\n", i); printf("deflateInit2() = %d\n", i);
......
...@@ -204,6 +204,8 @@ struct params { ...@@ -204,6 +204,8 @@ struct params {
unsigned gzip_stack_buffer; unsigned gzip_stack_buffer;
unsigned gzip_tmp_space; unsigned gzip_tmp_space;
unsigned gzip_level; unsigned gzip_level;
unsigned gzip_window;
unsigned gzip_memlevel;
double critbit_cooloff; double critbit_cooloff;
......
...@@ -887,6 +887,14 @@ static const struct parspec input_parspec[] = { ...@@ -887,6 +887,14 @@ static const struct parspec input_parspec[] = {
"Gzip compression level: 0=debug, 1=fast, 9=best", "Gzip compression level: 0=debug, 1=fast, 9=best",
0, 0,
"6", ""}, "6", ""},
{ "gzip_window", tweak_uint, &master.gzip_window, 8, 15,
"Gzip window size 8=least, 15=most compression",
0,
"8", ""},
{ "gzip_window", tweak_uint, &master.gzip_memlevel, 1, 9,
"Gzip memory level 1=least, 9=most compression",
0,
"1", ""},
{ "gzip_stack_buffer", tweak_uint, &master.gzip_stack_buffer, { "gzip_stack_buffer", tweak_uint, &master.gzip_stack_buffer,
2048, UINT_MAX, 2048, UINT_MAX,
"Size of stack buffer used for gzip processing.\n" "Size of stack buffer used for gzip processing.\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment