Lines Matching refs:strategy

59  * full-block strategy.
210 /* Returns true if the strategy supports using a row based matchfinder */
211 static int ZSTD_rowMatchFinderSupported(const ZSTD_strategy strategy) {
212 return (strategy >= ZSTD_greedy && strategy <= ZSTD_lazy2);
215 /* Returns true if the strategy and useRowMatchFinder mode indicate that we will use the row based matchfinder
218 static int ZSTD_rowMatchFinderUsed(const ZSTD_strategy strategy, const ZSTD_paramSwitch_e mode) {
220 return ZSTD_rowMatchFinderSupported(strategy) && (mode == ZSTD_ps_enable);
233 if (!ZSTD_rowMatchFinderSupported(cParams->strategy)) return mode;
246 return (cParams->strategy >= ZSTD_btopt && cParams->windowLog >= 17) ? ZSTD_ps_enable : ZSTD_ps_disable;
250 static int ZSTD_allocateChainTable(const ZSTD_strategy strategy,
257 return forDDSDict || ((strategy != ZSTD_fast) && !ZSTD_rowMatchFinderUsed(strategy, useRowMatchFinder));
261 * enable long distance matching (wlog >= 27, strategy >= btopt).
267 return (cParams->strategy >= ZSTD_btopt && cParams->windowLog >= 27) ? ZSTD_ps_enable : ZSTD_ps_disable;
737 CCtxParams->cParams.strategy = (ZSTD_strategy)value;
738 return (size_t)CCtxParams->cParams.strategy;
908 *value = (unsigned)CCtxParams->cParams.strategy;
1171 BOUNDCHECK(ZSTD_c_strategy, cParams.strategy);
1193 CLAMP_TYPE(ZSTD_c_strategy,cParams.strategy, ZSTD_strategy);
1294 U32 const cycleLog = ZSTD_cycleLog(cPar.chainLog, cPar.strategy);
1329 if (overrides->strategy) cParams->strategy = overrides->strategy;
1354 size_t const chainSize = ZSTD_allocateChainTable(cParams->strategy, useRowMatchFinder, enableDedicatedDictSearch && !forCCtx)
1372 size_t const lazyAdditionalSpace = ZSTD_rowMatchFinderUsed(cParams->strategy, useRowMatchFinder)
1375 size_t const optSpace = (forCCtx && (cParams->strategy >= ZSTD_btopt))
1452 if (ZSTD_rowMatchFinderSupported(cParams.strategy)) {
1514 if (ZSTD_rowMatchFinderSupported(cParams.strategy)) {
1585 assert(cParams1.strategy == cParams2.strategy);
1651 size_t const chainSize = ZSTD_allocateChainTable(cParams->strategy, useRowMatchFinder,
1689 if ((forWho == ZSTD_resetTarget_CCtx) && (cParams->strategy >= ZSTD_btopt)) {
1699 if (ZSTD_rowMatchFinderUsed(cParams->strategy, useRowMatchFinder)) {
1929 /* These are the approximate sizes for each strategy past which copying the
1950 size_t cutoff = attachDictSizeCutoffs[cdict->matchState.cParams.strategy];
1989 assert(cctx->appliedParams.cParams.strategy == adjusted_cdict_cParams.strategy);
2043 assert(cctx->appliedParams.cParams.strategy == cdict_cParams->strategy);
2052 { size_t const chainSize = ZSTD_allocateChainTable(cdict_cParams->strategy, cdict->useRowMatchFinder, 0 /* DDS guaranteed disabled */)
2061 if (ZSTD_allocateChainTable(cctx->appliedParams.cParams.strategy, cctx->appliedParams.useRowMatchFinder, 0 /* forDDSDict */)) {
2067 if (ZSTD_rowMatchFinderUsed(cdict_cParams->strategy, cdict->useRowMatchFinder)) {
2103 * in-place. We decide here which strategy to use. */
2154 assert(dstCCtx->appliedParams.cParams.strategy == srcCCtx->appliedParams.cParams.strategy);
2163 { size_t const chainSize = ZSTD_allocateChainTable(srcCCtx->appliedParams.cParams.strategy,
2224 * PreserveMark preserves "unsorted mark" for btlazy2 strategy.
2276 if (ZSTD_allocateChainTable(params->cParams.strategy, params->useRowMatchFinder, (U32)ms->dedicatedDictSearch)) {
2278 if (params->cParams.strategy == ZSTD_btlazy2)
2363 ZSTD_strategy strategy, unsigned* countWorkspace,
2390 ZSTD_defaultAllowed, strategy);
2423 defaultPolicy, strategy);
2453 ZSTD_defaultAllowed, strategy);
2492 ZSTD_strategy const strategy = cctxParams->cParams.strategy;
2523 cctxParams->cParams.strategy,
2561 strategy, count,
2623 { size_t const maxCSize = srcSize - ZSTD_minGain(srcSize, cctxParams->cParams.strategy);
2632 * assumption : strat is a valid strategy */
2731 if (zc->appliedParams.cParams.strategy >= ZSTD_btopt) {
2792 ZSTD_blockCompressor const blockCompressor = ZSTD_selectBlockCompressor(zc->appliedParams.cParams.strategy,
3089 ZSTD_strategy const strategy = cctxParams->cParams.strategy;
3102 strategy, countWorkspace,
3773 size_t const maxCSize = srcSize - ZSTD_minGain(srcSize, zc->appliedParams.cParams.strategy);
3816 U32 const cycleLog = ZSTD_cycleLog(params->cParams.chainLog, params->cParams.strategy);
4158 switch(params->cParams.strategy)
4197 assert(0); /* not possible : not a valid strategy id */
5993 switch (cParams.strategy) {
6014 return (cParams->strategy >= ZSTD_greedy)
6015 && (cParams->strategy <= ZSTD_lazy2)
6027 switch (cParams->strategy) {
6086 DEBUGLOG(5, "ZSTD_getCParams_internal selected tableID: %u row: %u strat: %u", tableID, row, (U32)cp.strategy);