mirror of
https://github.com/facebook/zstd.git
synced 2024-12-15 17:20:07 +08:00
fix compression bug in rollbuffer mode
This commit is contained in:
parent
138e89c9c4
commit
94b9d8ec8d
@ -867,7 +867,7 @@ size_t ZSTD_compressBlock_fast_extDict_generic(ZSTD_CCtx* ctx,
|
||||
const BYTE* iEndCount = (matchEnd - match < iend - ip) ? ip + (matchEnd - match) : iend;
|
||||
size_t matchLength = ZSTD_count(ip+MINMATCH, match+MINMATCH, iEndCount);
|
||||
size_t offsetCode = current-matchIndex;
|
||||
if (matchIndex + matchLength + MINMATCH == dictLimit)
|
||||
if (match + matchLength + MINMATCH == matchEnd)
|
||||
matchLength += ZSTD_count(ip + matchLength + MINMATCH, base + dictLimit, iend);
|
||||
if (offsetCode == offset_2) offsetCode = 0;
|
||||
offset_2 = offset_1;
|
||||
|
Loading…
Reference in New Issue
Block a user