diff --git a/lib/compress/zstd_double_fast.c b/lib/compress/zstd_double_fast.c index 9a2cf898..7b9e18e7 100644 --- a/lib/compress/zstd_double_fast.c +++ b/lib/compress/zstd_double_fast.c @@ -90,9 +90,9 @@ size_t ZSTD_compressBlock_doubleFast_generic( prefixLowestIndex - (U32)(dictEnd - dictBase) : 0; const U32 dictHBitsL = dictMode == ZSTD_dictMatchState ? - dictCParams->hashLog : 0; + dictCParams->hashLog : hBitsL; const U32 dictHBitsS = dictMode == ZSTD_dictMatchState ? - dictCParams->chainLog : 0; + dictCParams->chainLog : hBitsS; const U32 dictAndPrefixLength = (U32)(ip - prefixLowest + dictEnd - dictStart); assert(dictMode == ZSTD_noDict || dictMode == ZSTD_dictMatchState); diff --git a/lib/compress/zstd_fast.c b/lib/compress/zstd_fast.c index dfb46abe..24774651 100644 --- a/lib/compress/zstd_fast.c +++ b/lib/compress/zstd_fast.c @@ -82,7 +82,7 @@ size_t ZSTD_compressBlock_fast_generic( 0; const U32 dictAndPrefixLength = (U32)(ip - prefixStart + dictEnd - dictStart); const U32 dictHLog = dictMode == ZSTD_dictMatchState ? - dictCParams->hashLog : 0; + dictCParams->hashLog : hlog; assert(dictMode == ZSTD_noDict || dictMode == ZSTD_dictMatchState); diff --git a/lib/compress/zstd_opt.c b/lib/compress/zstd_opt.c index 17026564..8af69a91 100644 --- a/lib/compress/zstd_opt.c +++ b/lib/compress/zstd_opt.c @@ -533,8 +533,8 @@ U32 ZSTD_insertBtAndGetAllMatches ( U32 const dmsHighLimit = dictMode == ZSTD_dictMatchState ? (U32)(dmsEnd - dmsBase) : 0; U32 const dmsLowLimit = dictMode == ZSTD_dictMatchState ? dms->window.lowLimit : 0; U32 const dmsIndexDelta = dictMode == ZSTD_dictMatchState ? windowLow - dmsHighLimit : 0; - U32 const dmsHashLog = dictMode == ZSTD_dictMatchState ? dmsCParams->hashLog : 0; - U32 const dmsBtLog = dictMode == ZSTD_dictMatchState ? dmsCParams->chainLog - 1 : 0; + U32 const dmsHashLog = dictMode == ZSTD_dictMatchState ? dmsCParams->hashLog : hashLog; + U32 const dmsBtLog = dictMode == ZSTD_dictMatchState ? dmsCParams->chainLog - 1 : btLog; U32 const dmsBtMask = dictMode == ZSTD_dictMatchState ? (1U << dmsBtLog) - 1 : 0; U32 const dmsBtLow = dictMode == ZSTD_dictMatchState && dmsBtMask < dmsHighLimit - dmsLowLimit ? dmsHighLimit - dmsBtMask : dmsLowLimit;