mirror of
https://github.com/facebook/zstd.git
synced 2025-12-09 00:03:18 -05:00
loading dict using new algorithm
This commit is contained in:
parent
22705f0c93
commit
628559d0e4
@ -2892,7 +2892,9 @@ static size_t ZSTD_loadDictionaryContent(ZSTD_matchState_t* ms,
|
|||||||
case ZSTD_greedy:
|
case ZSTD_greedy:
|
||||||
case ZSTD_lazy:
|
case ZSTD_lazy:
|
||||||
case ZSTD_lazy2:
|
case ZSTD_lazy2:
|
||||||
if (chunk >= HASH_READ_SIZE)
|
if (chunk >= HASH_READ_SIZE && params->enableDedicatedDictSearch)
|
||||||
|
ZSTD_lazy_loadDictionary(ms, ichunk-HASH_READ_SIZE);
|
||||||
|
else if (chunk >= HASH_READ_SIZE)
|
||||||
ZSTD_insertAndFindFirstIndex(ms, ichunk-HASH_READ_SIZE);
|
ZSTD_insertAndFindFirstIndex(ms, ichunk-HASH_READ_SIZE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@ -580,7 +580,7 @@ size_t ZSTD_HcFindBestMatch_generic (
|
|||||||
/* save best solution */
|
/* save best solution */
|
||||||
if (currentMl > ml) {
|
if (currentMl > ml) {
|
||||||
ml = currentMl;
|
ml = currentMl;
|
||||||
*offsetPtr = current - (matchIndex + dmsIndexDelta) + ZSTD_REP_MOVE;
|
*offsetPtr = curr - (matchIndex + dmsIndexDelta) + ZSTD_REP_MOVE;
|
||||||
if (ip+currentMl == iLimit) break; /* best possible, avoids read overflow on next attempt */
|
if (ip+currentMl == iLimit) break; /* best possible, avoids read overflow on next attempt */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user