[libzstd] Setting ZSTD_d_maxWindowLog to 0 means default
This commit is contained in:
@@ -1372,6 +1372,7 @@ size_t ZSTD_DCtx_setParameter(ZSTD_DCtx* dctx, ZSTD_dParameter dParam, int value
|
||||
RETURN_ERROR_IF(dctx->streamStage != zdss_init, stage_wrong);
|
||||
switch(dParam) {
|
||||
case ZSTD_d_windowLogMax:
|
||||
if (value == 0) value = ZSTD_WINDOWLOG_LIMIT_DEFAULT;
|
||||
CHECK_DBOUNDS(ZSTD_d_windowLogMax, value);
|
||||
dctx->maxWindowSize = ((size_t)1) << value;
|
||||
return 0;
|
||||
|
||||
+2
-1
@@ -852,7 +852,8 @@ typedef enum {
|
||||
* the streaming API will refuse to allocate memory buffer
|
||||
* in order to protect the host from unreasonable memory requirements.
|
||||
* This parameter is only useful in streaming mode, since no internal buffer is allocated in single-pass mode.
|
||||
* By default, a decompression context accepts window sizes <= (1 << ZSTD_WINDOWLOG_LIMIT_DEFAULT) */
|
||||
* By default, a decompression context accepts window sizes <= (1 << ZSTD_WINDOWLOG_LIMIT_DEFAULT).
|
||||
* Special: value 0 means "use default maximum windowLog". */
|
||||
|
||||
/* note : additional experimental parameters are also available
|
||||
* within the experimental section of the API.
|
||||
|
||||
Reference in New Issue
Block a user