From c15957b9904edb1cd2737819f1a2da1474cd70de Mon Sep 17 00:00:00 2001 From: Moinak Ghosh Date: Sun, 2 Mar 2014 17:13:31 +0530 Subject: [PATCH] Avoid auto-selection variable chunking for buffer sizes below threshold. --- pcompress.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pcompress.c b/pcompress.c index 025f9d5..379cc6c 100644 --- a/pcompress.c +++ b/pcompress.c @@ -3288,8 +3288,10 @@ init_pc_context(pc_ctx_t *pctx, int argc, char *argv[]) if (pctx->level > 3) { if (pctx->chunksize >= RAB_MIN_CHUNK_SIZE_GLOBAL) pctx->enable_rabin_global = 1; - pctx->enable_rabin_scan = 1; - pctx->enable_rabin_split = 1; + if (pctx->chunksize >= RAB_MIN_CHUNK_SIZE) { + pctx->enable_rabin_scan = 1; + pctx->enable_rabin_split = 1; + } pctx->rab_blk_size = 2; if (pctx->level > 5) pctx->rab_blk_size = 1; if (pctx->level > 8) pctx->rab_blk_size = 0;