Added support for forcing new CDict behavior and updated enum

This commit is contained in:
Sen Huang
2019-10-21 15:36:12 -04:00
parent 9294f4826b
commit e4de8b098a
2 changed files with 8 additions and 2 deletions
+2 -1
View File
@@ -2908,7 +2908,8 @@ static size_t ZSTD_compressBegin_internal(ZSTD_CCtx* cctx,
assert(!((dict) && (cdict))); /* either dict or cdict, not both */
if ( (cdict)
&& (cdict->dictContentSize > 0)
&& (pledgedSrcSize < ZSTD_USE_CDICT_PARAMS_CUTOFF || cdict->compressionLevel == 0) ) {
&& (pledgedSrcSize < ZSTD_USE_CDICT_PARAMS_CUTOFF || cdict->compressionLevel == 0)
&& (params->attachDictPref != ZSTD_dictForceInputParams) ) {
return ZSTD_resetCCtx_usingCDict(cctx, cdict, params, pledgedSrcSize, zbuff);
}