mirror of
https://github.com/facebook/zstd.git
synced 2025-12-08 00:03:24 -05:00
Fix #1861: Restrict overlapLog Parameter When Not Built With Multithreading
This parameter is unused in single-threaded compression. We should make it behave like the other multithread-only parameters, for which we only accept zero when we are not built with multithreading.
This commit is contained in:
parent
73f8905b83
commit
c13f81905a
@ -339,8 +339,13 @@ ZSTD_bounds ZSTD_cParam_getBounds(ZSTD_cParameter param)
|
|||||||
return bounds;
|
return bounds;
|
||||||
|
|
||||||
case ZSTD_c_overlapLog:
|
case ZSTD_c_overlapLog:
|
||||||
|
#ifdef ZSTD_MULTITHREAD
|
||||||
bounds.lowerBound = ZSTD_OVERLAPLOG_MIN;
|
bounds.lowerBound = ZSTD_OVERLAPLOG_MIN;
|
||||||
bounds.upperBound = ZSTD_OVERLAPLOG_MAX;
|
bounds.upperBound = ZSTD_OVERLAPLOG_MAX;
|
||||||
|
#else
|
||||||
|
bounds.lowerBound = 0;
|
||||||
|
bounds.upperBound = 0;
|
||||||
|
#endif
|
||||||
return bounds;
|
return bounds;
|
||||||
|
|
||||||
case ZSTD_c_enableLongDistanceMatching:
|
case ZSTD_c_enableLongDistanceMatching:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user