mirror of
https://github.com/facebook/zstd.git
synced 2025-10-09 00:05:28 -04:00
removed requirement that offset be less than windowSize
This commit is contained in:
parent
eeff2d0e3c
commit
32e36c2d9a
@ -685,7 +685,7 @@ static U32 generateSequences(U32* seed, frame_t* frame, seqStore_t* seqStore,
|
|||||||
/* need to occasionally generate offsets that go past the start */
|
/* need to occasionally generate offsets that go past the start */
|
||||||
/* we still need to be within the windowSize however */
|
/* we still need to be within the windowSize however */
|
||||||
U32 const lenPastStart = RAND(seed) % info.dictContentSize;
|
U32 const lenPastStart = RAND(seed) % info.dictContentSize;
|
||||||
offset = MIN(frame->header.windowSize, offset+lenPastStart);
|
offset = offset+lenPastStart;
|
||||||
}
|
}
|
||||||
offsetCode = offset + ZSTD_REP_MOVE;
|
offsetCode = offset + ZSTD_REP_MOVE;
|
||||||
repIndex = 2;
|
repIndex = 2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user