8 KB /* ZSTD_btultra */
};
+static const ZSTD_strategy splitLogCutoffStrategy = ZSTD_btlazy2;
+
static int ZSTD_shouldAttachDict(ZSTD_CCtx* cctx,
const ZSTD_CDict* cdict,
ZSTD_CCtx_params params,
&& params.attachDictPref != ZSTD_dictForceCopy
&& !params.forceWindow /* dictMatchState isn't correctly
* handled in _enforceMaxDist */
- && ( (cdict->matchState.cParams.strategy <= ZSTD_dfast)
- || (cdict->matchState.cParams.strategy > ZSTD_dfast &&
+ && ( (cdict->matchState.cParams.strategy <= splitLogCutoffStrategy)
+ || (cdict->matchState.cParams.strategy > splitLogCutoffStrategy &&
ZSTD_equivalentCParams(cctx->appliedParams.cParams,
cdict->matchState.cParams)));
}
/* Copy only compression parameters related to tables. */
params.cParams = *cdict_cParams;
params.cParams.windowLog = windowLog;
- if (params.cParams.strategy <= ZSTD_dfast) {
+ if (params.cParams.strategy <= splitLogCutoffStrategy) {
DEBUGLOG(4, "Overriding hashLog from %d to %d", params.cParams.hashLog, cctx->requestedParams.cParams.hashLog);
DEBUGLOG(4, "Overriding chainLog from %d to %d", params.cParams.chainLog, cctx->requestedParams.cParams.chainLog);
if (cctx->requestedParams.cParams.hashLog)
ZSTD_resetCCtx_internal(cctx, params, pledgedSrcSize,
ZSTDcrp_continue, zbuff);
assert(cctx->appliedParams.cParams.strategy == cdict_cParams->strategy);
- if (params.cParams.strategy > ZSTD_dfast) {
+ if (params.cParams.strategy > splitLogCutoffStrategy) {
assert(cctx->appliedParams.cParams.hashLog == cdict_cParams->hashLog);
assert(cctx->appliedParams.cParams.chainLog == cdict_cParams->chainLog);
}