]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Also Use `matchLow` for HC3 Match
authorW. Felix Handte <w@felixhandte.com>
Wed, 20 Jun 2018 19:51:14 +0000 (15:51 -0400)
committerW. Felix Handte <w@felixhandte.com>
Wed, 20 Jun 2018 19:51:14 +0000 (15:51 -0400)
lib/compress/zstd_opt.c

index 0abdf3b90e6cddc8a06723d9a32d32f442ed4801..90a2620251b23510f70028efcf8c7abfff749bf1 100644 (file)
@@ -581,7 +581,7 @@ U32 ZSTD_insertBtAndGetAllMatches (
     /* HC3 match finder */
     if ((mls == 3) /*static*/ && (bestLength < mls)) {
         U32 const matchIndex3 = ZSTD_insertAndFindFirstIndexHash3(ms, ip);
-        if ((matchIndex3 > windowLow)
+        if ((matchIndex3 >= matchLow)
           & (current - matchIndex3 < (1<<18)) /*heuristic : longer distance likely too expensive*/ ) {
             size_t mlen;
             if ((dictMode == ZSTD_noDict) /*static*/ || (dictMode == ZSTD_dictMatchState) /*static*/ || (matchIndex3 >= dictLimit)) {