Lines Matching full: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) { in ZSTD_rowMatchFinderSupported() argument
212 return (strategy >= ZSTD_greedy && strategy <= ZSTD_lazy2); in ZSTD_rowMatchFinderSupported()
215 /* Returns true if the strategy and useRowMatchFinder mode indicate that we will use the row based …
218 static int ZSTD_rowMatchFinderUsed(const ZSTD_strategy strategy, const ZSTD_paramSwitch_e mode) { in ZSTD_rowMatchFinderUsed() argument
220 return ZSTD_rowMatchFinderSupported(strategy) && (mode == ZSTD_ps_enable); in ZSTD_rowMatchFinderUsed()
233 if (!ZSTD_rowMatchFinderSupported(cParams->strategy)) return mode; in ZSTD_resolveRowMatchFinderMode()
246 …return (cParams->strategy >= ZSTD_btopt && cParams->windowLog >= 17) ? ZSTD_ps_enable : ZSTD_ps_di… in ZSTD_resolveBlockSplitterMode()
250 static int ZSTD_allocateChainTable(const ZSTD_strategy strategy, in ZSTD_allocateChainTable() argument
257 …return forDDSDict || ((strategy != ZSTD_fast) && !ZSTD_rowMatchFinderUsed(strategy, useRowMatchFin… in ZSTD_allocateChainTable()
261 * enable long distance matching (wlog >= 27, strategy >= btopt).
267 …return (cParams->strategy >= ZSTD_btopt && cParams->windowLog >= 27) ? ZSTD_ps_enable : ZSTD_ps_di… in ZSTD_resolveEnableLdm()
737 CCtxParams->cParams.strategy = (ZSTD_strategy)value; in ZSTD_CCtxParams_setParameter()
738 return (size_t)CCtxParams->cParams.strategy; in ZSTD_CCtxParams_setParameter()
908 *value = (unsigned)CCtxParams->cParams.strategy; in ZSTD_CCtxParams_getParameter()
1171 BOUNDCHECK(ZSTD_c_strategy, cParams.strategy); in ZSTD_checkCParams()
1193 CLAMP_TYPE(ZSTD_c_strategy,cParams.strategy, ZSTD_strategy); in ZSTD_clampCParams()
1294 U32 const cycleLog = ZSTD_cycleLog(cPar.chainLog, cPar.strategy); in ZSTD_adjustCParams_internal()
1329 if (overrides->strategy) cParams->strategy = overrides->strategy; in ZSTD_overrideCParams()
1354 …size_t const chainSize = ZSTD_allocateChainTable(cParams->strategy, useRowMatchFinder, enableDedic… in ZSTD_sizeof_matchState()
1372 size_t const lazyAdditionalSpace = ZSTD_rowMatchFinderUsed(cParams->strategy, useRowMatchFinder) in ZSTD_sizeof_matchState()
1375 size_t const optSpace = (forCCtx && (cParams->strategy >= ZSTD_btopt)) in ZSTD_sizeof_matchState()
1452 if (ZSTD_rowMatchFinderSupported(cParams.strategy)) { in ZSTD_estimateCCtxSize_usingCParams()
1514 if (ZSTD_rowMatchFinderSupported(cParams.strategy)) { in ZSTD_estimateCStreamSize_usingCParams()
1585 assert(cParams1.strategy == cParams2.strategy); in ZSTD_assertEqualCParams()
1651 size_t const chainSize = ZSTD_allocateChainTable(cParams->strategy, useRowMatchFinder, in ZSTD_reset_matchState()
1689 if ((forWho == ZSTD_resetTarget_CCtx) && (cParams->strategy >= ZSTD_btopt)) { in ZSTD_reset_matchState()
1699 if (ZSTD_rowMatchFinderUsed(cParams->strategy, useRowMatchFinder)) { in ZSTD_reset_matchState()
1929 /* These are the approximate sizes for each strategy past which copying the
1950 size_t cutoff = attachDictSizeCutoffs[cdict->matchState.cParams.strategy]; in ZSTD_shouldAttachDict()
1989 assert(cctx->appliedParams.cParams.strategy == adjusted_cdict_cParams.strategy); in ZSTD_resetCCtx_byAttachingCDict()
2043 assert(cctx->appliedParams.cParams.strategy == cdict_cParams->strategy); in ZSTD_resetCCtx_byCopyingCDict()
2052 …{ size_t const chainSize = ZSTD_allocateChainTable(cdict_cParams->strategy, cdict->useRowMatchFi… in ZSTD_resetCCtx_byCopyingCDict()
2061 …if (ZSTD_allocateChainTable(cctx->appliedParams.cParams.strategy, cctx->appliedParams.useRowMatchF… in ZSTD_resetCCtx_byCopyingCDict()
2067 if (ZSTD_rowMatchFinderUsed(cdict_cParams->strategy, cdict->useRowMatchFinder)) { in ZSTD_resetCCtx_byCopyingCDict()
2103 * in-place. We decide here which strategy to use. */
2154 assert(dstCCtx->appliedParams.cParams.strategy == srcCCtx->appliedParams.cParams.strategy); in ZSTD_copyCCtx_internal()
2163 { size_t const chainSize = ZSTD_allocateChainTable(srcCCtx->appliedParams.cParams.strategy, in ZSTD_copyCCtx_internal()
2224 * PreserveMark preserves "unsorted mark" for btlazy2 strategy.
2276 …if (ZSTD_allocateChainTable(params->cParams.strategy, params->useRowMatchFinder, (U32)ms->dedicate… in ZSTD_reduceIndex()
2278 if (params->cParams.strategy == ZSTD_btlazy2) in ZSTD_reduceIndex()
2363 ZSTD_strategy strategy, unsigned* countWorkspace, in ZSTD_buildSequencesStatistics() argument
2390 ZSTD_defaultAllowed, strategy); in ZSTD_buildSequencesStatistics()
2423 defaultPolicy, strategy); in ZSTD_buildSequencesStatistics()
2453 ZSTD_defaultAllowed, strategy); in ZSTD_buildSequencesStatistics()
2492 ZSTD_strategy const strategy = cctxParams->cParams.strategy; in ZSTD_entropyCompressSeqStore_internal() local
2523 cctxParams->cParams.strategy, in ZSTD_entropyCompressSeqStore_internal()
2561 strategy, count, in ZSTD_entropyCompressSeqStore_internal()
2623 { size_t const maxCSize = srcSize - ZSTD_minGain(srcSize, cctxParams->cParams.strategy); in ZSTD_entropyCompressSeqStore()
2632 * assumption : strat is a valid strategy */
2731 if (zc->appliedParams.cParams.strategy >= ZSTD_btopt) { in ZSTD_buildSeqStore()
2792 …ckCompressor const blockCompressor = ZSTD_selectBlockCompressor(zc->appliedParams.cParams.strategy, in ZSTD_buildSeqStore()
3089 ZSTD_strategy const strategy = cctxParams->cParams.strategy; in ZSTD_buildBlockEntropyStats_sequences() local
3102 strategy, countWorkspace, in ZSTD_buildBlockEntropyStats_sequences()
3773 … size_t const maxCSize = srcSize - ZSTD_minGain(srcSize, zc->appliedParams.cParams.strategy); in ZSTD_compressBlock_targetCBlockSize_body()
3816 U32 const cycleLog = ZSTD_cycleLog(params->cParams.chainLog, params->cParams.strategy); in ZSTD_overflowCorrectIfNeeded()
4158 switch(params->cParams.strategy) in ZSTD_loadDictionaryContent()
4197 assert(0); /* not possible : not a valid strategy id */ in ZSTD_loadDictionaryContent()
5995 switch (cParams.strategy) { in ZSTD_dedicatedDictSearch_getCParams()
6016 return (cParams->strategy >= ZSTD_greedy) in ZSTD_dedicatedDictSearch_isSupported()
6017 && (cParams->strategy <= ZSTD_lazy2) in ZSTD_dedicatedDictSearch_isSupported()
6029 switch (cParams->strategy) { in ZSTD_dedicatedDictSearch_revertCParams()
6088 …"ZSTD_getCParams_internal selected tableID: %u row: %u strat: %u", tableID, row, (U32)cp.strategy); in ZSTD_getCParams_internal()