From: daniellerozenblit <48103643+daniellerozenblit@users.noreply.github.com> Date: Wed, 4 Jan 2023 21:34:07 +0000 (-0500) Subject: Merge branch 'dev' into fuzz-max-block-size X-Git-Tag: v1.5.4^2~49^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d913417f726643872140bf558f7d1e47d86db919;p=thirdparty%2Fzstd.git Merge branch 'dev' into fuzz-max-block-size --- d913417f726643872140bf558f7d1e47d86db919 diff --cc lib/compress/zstd_compress.c index b9b056cd5,b12cacc77..e13a80779 --- a/lib/compress/zstd_compress.c +++ b/lib/compress/zstd_compress.c @@@ -675,7 -670,6 +675,7 @@@ static int ZSTD_isUpdateAuthorized(ZSTD case ZSTD_c_deterministicRefPrefix: case ZSTD_c_prefetchCDictTables: case ZSTD_c_enableMatchFinderFallback: - case ZSTD_c_maxBlockSize: ++ case ZSTD_c_maxBlockSize default: return 0; } @@@ -971,11 -964,6 +971,11 @@@ size_t ZSTD_CCtxParams_setParameter(ZST CCtxParams->enableMatchFinderFallback = value; return CCtxParams->enableMatchFinderFallback; + case ZSTD_c_maxBlockSize: + BOUNDCHECK(ZSTD_c_maxBlockSize, value); + CCtxParams->maxBlockSize = value; + return CCtxParams->prefetchCDictTables; - ++ default: RETURN_ERROR(parameter_unsupported, "unknown parameter"); } } diff --cc lib/zstd.h index c2dfda7bb,480d65f67..b46700b54 --- a/lib/zstd.h +++ b/lib/zstd.h @@@ -500,9 -499,7 +500,8 @@@ typedef enum ZSTD_c_experimentalParam14=1011, ZSTD_c_experimentalParam15=1012, ZSTD_c_experimentalParam16=1013, - ZSTD_c_experimentalParam17=1014 + ZSTD_c_experimentalParam17=1014, + ZSTD_c_experimentalParam18=1015, - } ZSTD_cParameter; typedef struct {