From: Yann Collet Date: Fri, 6 Nov 2015 16:13:46 +0000 (+0100) Subject: minor CRatio improvement X-Git-Tag: zstd-0.3.5^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47cfa9a98539ff0acf31ac2428b90a56e18a1071;p=thirdparty%2Fzstd.git minor CRatio improvement --- diff --git a/lib/zstdhc.c b/lib/zstdhc.c index a8e6631e8..e2dfafc1d 100644 --- a/lib/zstdhc.c +++ b/lib/zstdhc.c @@ -707,6 +707,8 @@ size_t ZSTD_HC_compressBlock_lazy_generic(ZSTD_HC_CCtx* ctx, } /* store sequence */ + if (offset) + while ((start>anchor) && (start-offset>ctx->base) && (start[-1] == start[-1-offset])) { start--; matchLength++; } /* catch up */ { size_t litLength = start - anchor; if (offset) offset_1 = offset;