mirror of
https://github.com/facebook/zstd.git
synced 2025-11-29 00:04:37 -05:00
fix window resizing edge case
This commit is contained in:
parent
dc39409a03
commit
69ec75f0d5
@ -1370,8 +1370,8 @@ ZSTD_adjustCParams_internal(ZSTD_compressionParameters cPar,
|
||||
}
|
||||
|
||||
/* resize windowLog if input is small enough, to use less memory */
|
||||
if ( (srcSize < maxWindowResize)
|
||||
&& (dictSize < maxWindowResize) ) {
|
||||
if ( (srcSize <= maxWindowResize)
|
||||
&& (dictSize <= maxWindowResize) ) {
|
||||
U32 const tSize = (U32)(srcSize + dictSize);
|
||||
static U32 const hashSizeMin = 1 << ZSTD_HASHLOG_MIN;
|
||||
U32 const srcLog = (tSize < hashSizeMin) ? ZSTD_HASHLOG_MIN :
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user