refactored fix to be more generic and applicable to both btlazy2 and btopt

This commit is contained in:
Yann Collet
2016-02-15 17:06:29 +01:00
parent b37e0a9241
commit b8a6f6824b
2 changed files with 28 additions and 19 deletions
+2 -2
View File
@@ -264,7 +264,7 @@ U32 ZSTD_BtGetAllMatches (
const U32 maxNbAttempts, const U32 mls, ZSTD_match_t* matches, U32 minml)
{
if (ip < zc->base + zc->nextToUpdate) return 0; /* skipped area */
ZSTD_updateTree(zc, ip, iLimit, maxNbAttempts, mls, 0, 0);
ZSTD_updateTree(zc, ip, iLimit, maxNbAttempts, mls);
return ZSTD_insertBtAndGetAllMatches(zc, ip, iLimit, maxNbAttempts, mls, 0, matches, minml);
}
@@ -292,7 +292,7 @@ U32 ZSTD_BtGetAllMatches_extDict (
const U32 maxNbAttempts, const U32 mls, ZSTD_match_t* matches, U32 minml)
{
if (ip < zc->base + zc->nextToUpdate) return 0; /* skipped area */
ZSTD_updateTree(zc, ip, iLimit, maxNbAttempts, mls, 1, 0);
ZSTD_updateTree_extDict(zc, ip, iLimit, maxNbAttempts, mls);
return ZSTD_insertBtAndGetAllMatches(zc, ip, iLimit, maxNbAttempts, mls, 1, matches, minml);
}