From: Yann Collet Date: Fri, 6 Nov 2015 15:33:11 +0000 (+0100) Subject: minor greedy CRatio improvement X-Git-Tag: zstd-0.3.5^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb283710ddff569e3fb4f31e855bdd5edf453de0;p=thirdparty%2Fzstd.git minor greedy CRatio improvement --- diff --git a/lib/zstdhc.c b/lib/zstdhc.c index d84c19987..a8e6631e8 100644 --- a/lib/zstdhc.c +++ b/lib/zstdhc.c @@ -802,7 +802,7 @@ size_t ZSTD_HC_compressBlock_greedy(ZSTD_HC_CCtx* ctx, void* dst, size_t maxDstS ip += ((ip-anchor) >> g_searchStrength) + 1; /* jump faster over incompressible sections */ continue; } - while ((ip>anchor) && (ip-offset>ctx->base) && (ip[-1] == ip[-1-offset])) { ip--; } /* catch up */ + while ((ip>anchor) && (ip-offset>ctx->base) && (ip[-1] == ip[-1-offset])) { ip--; matchLength++; } /* catch up */ /* store sequence */ { size_t litLength = ip-anchor;