minor boundary change

improves compression ratio at low levels
This commit is contained in:
Yann Collet
2025-02-05 18:41:59 -08:00
parent ffa66a6971
commit 34ba14437a
3 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -4960,7 +4960,7 @@ ZSTD_loadDictionaryContent(ZSTD_MatchState_t* ms,
}
/* If the dict is larger than we can reasonably index in our tables, only load the suffix. */
{ U32 maxDictSize = 2U << MIN(MAX(params->cParams.hashLog, params->cParams.chainLog), 30);
{ U32 maxDictSize = 1U << MIN(MAX(params->cParams.hashLog + 3, params->cParams.chainLog + 1), 31);
if (srcSize > maxDictSize) {
ip = iend - maxDictSize;
src = ip;