From c71407657d32b973d4488c494834648e44fc99c4 Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Tue, 20 Nov 2012 17:11:13 +0100 Subject: [PATCH] BUG/MINOR: compression: dynamic level increase Using compression rate limit, the compression level wasn't taking care of the max compression level during a session because the test was done on the wrong variable. --- src/compression.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compression.c b/src/compression.c index 1df0f57a7..2dc893aa5 100644 --- a/src/compression.c +++ b/src/compression.c @@ -570,7 +570,7 @@ int deflate_flush(struct comp_ctx *comp_ctx, struct buffer *out, int flag) deflateParams(&comp_ctx->strm, comp_ctx->cur_lvl, Z_DEFAULT_STRATEGY); } - } else if (comp_ctx->cur_lvl < global.comp_rate_lim) { + } else if (comp_ctx->cur_lvl < global.tune.comp_maxlevel) { /* increase level */ comp_ctx->cur_lvl++ ; deflateParams(&comp_ctx->strm, comp_ctx->cur_lvl, Z_DEFAULT_STRATEGY);