From 47cfa9a98539ff0acf31ac2428b90a56e18a1071 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Fri, 6 Nov 2015 17:13:46 +0100 Subject: [PATCH] minor CRatio improvement --- lib/zstdhc.c | 2 ++ 1 file changed, 2 insertions(+) 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;