Lines Matching full:strategy

215 /* Returns true if the strategy supports using a row based matchfinder */
216 static int ZSTD_rowMatchFinderSupported(const ZSTD_strategy strategy) { in ZSTD_rowMatchFinderSupported() argument
217 return (strategy >= ZSTD_greedy && strategy <= ZSTD_lazy2); in ZSTD_rowMatchFinderSupported()
220 /* Returns true if the strategy and useRowMatchFinder mode indicate that we will use the row based …
223 static int ZSTD_rowMatchFinderUsed(const ZSTD_strategy strategy, const ZSTD_ParamSwitch_e mode) { in ZSTD_rowMatchFinderUsed() argument
225 return ZSTD_rowMatchFinderSupported(strategy) && (mode == ZSTD_ps_enable); in ZSTD_rowMatchFinderUsed()
237 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()
295 return cParams->strategy == ZSTD_fast || cParams->strategy == ZSTD_dfast; in ZSTD_CDictIndicesAreTagged()
811 CCtxParams->cParams.strategy = (ZSTD_strategy)value; in ZSTD_CCtxParams_setParameter()
812 return (size_t)CCtxParams->cParams.strategy; in ZSTD_CCtxParams_setParameter()
1012 *value = (int)CCtxParams->cParams.strategy; in ZSTD_CCtxParams_getParameter()
1140 FORWARD_IF_ERROR(ZSTD_CCtx_setParameter(cctx, ZSTD_c_strategy, (int)cparams.strategy), ""); in ZSTD_CCtx_setCParams()
1332 BOUNDCHECK(ZSTD_c_strategy, (int)cParams.strategy); in ZSTD_checkCParams()
1355 CLAMP_TYPE(ZSTD_c_strategy,cParams.strategy, ZSTD_strategy); in ZSTD_clampCParams()
1419 /* Cascade the selected strategy down to the next-highest one built into in ZSTD_adjustCParams_internal()
1422 if (cPar.strategy == ZSTD_btultra2) { in ZSTD_adjustCParams_internal()
1423 cPar.strategy = ZSTD_btultra; in ZSTD_adjustCParams_internal()
1425 if (cPar.strategy == ZSTD_btultra) { in ZSTD_adjustCParams_internal()
1426 cPar.strategy = ZSTD_btopt; in ZSTD_adjustCParams_internal()
1430 if (cPar.strategy == ZSTD_btopt) { in ZSTD_adjustCParams_internal()
1431 cPar.strategy = ZSTD_btlazy2; in ZSTD_adjustCParams_internal()
1435 if (cPar.strategy == ZSTD_btlazy2) { in ZSTD_adjustCParams_internal()
1436 cPar.strategy = ZSTD_lazy2; in ZSTD_adjustCParams_internal()
1440 if (cPar.strategy == ZSTD_lazy2) { in ZSTD_adjustCParams_internal()
1441 cPar.strategy = ZSTD_lazy; in ZSTD_adjustCParams_internal()
1445 if (cPar.strategy == ZSTD_lazy) { in ZSTD_adjustCParams_internal()
1446 cPar.strategy = ZSTD_greedy; in ZSTD_adjustCParams_internal()
1450 if (cPar.strategy == ZSTD_greedy) { in ZSTD_adjustCParams_internal()
1451 cPar.strategy = ZSTD_dfast; in ZSTD_adjustCParams_internal()
1455 if (cPar.strategy == ZSTD_dfast) { in ZSTD_adjustCParams_internal()
1456 cPar.strategy = ZSTD_fast; in ZSTD_adjustCParams_internal()
1499 U32 const cycleLog = ZSTD_cycleLog(cPar.chainLog, cPar.strategy); in ZSTD_adjustCParams_internal()
1533 if (ZSTD_rowMatchFinderUsed(cPar.strategy, useRowMatchFinder)) { in ZSTD_adjustCParams_internal()
1570 if (overrides->strategy) cParams->strategy = overrides->strategy; in ZSTD_overrideCParams()
1596 …size_t const chainSize = ZSTD_allocateChainTable(cParams->strategy, useRowMatchFinder, enableDedic… in ZSTD_sizeof_matchState()
1614 size_t const lazyAdditionalSpace = ZSTD_rowMatchFinderUsed(cParams->strategy, useRowMatchFinder) in ZSTD_sizeof_matchState()
1617 size_t const optSpace = (forCCtx && (cParams->strategy >= ZSTD_btopt)) in ZSTD_sizeof_matchState()
1708 if (ZSTD_rowMatchFinderSupported(cParams.strategy)) { in ZSTD_estimateCCtxSize_usingCParams()
1770 if (ZSTD_rowMatchFinderSupported(cParams.strategy)) { in ZSTD_estimateCStreamSize_usingCParams()
1841 assert(cParams1.strategy == cParams2.strategy); in ZSTD_assertEqualCParams()
1920 size_t const chainSize = ZSTD_allocateChainTable(cParams->strategy, useRowMatchFinder, in ZSTD_reset_matchState()
1958 if (ZSTD_rowMatchFinderUsed(cParams->strategy, useRowMatchFinder)) { in ZSTD_reset_matchState()
1980 if ((forWho == ZSTD_resetTarget_CCtx) && (cParams->strategy >= ZSTD_btopt)) { in ZSTD_reset_matchState()
2218 /* These are the approximate sizes for each strategy past which copying the
2239 size_t cutoff = attachDictSizeCutoffs[cdict->matchState.cParams.strategy]; in ZSTD_shouldAttachDict()
2279 assert(cctx->appliedParams.cParams.strategy == adjusted_cdict_cParams.strategy); in ZSTD_resetCCtx_byAttachingCDict()
2349 assert(cctx->appliedParams.cParams.strategy == cdict_cParams->strategy); in ZSTD_resetCCtx_byCopyingCDict()
2358 …{ size_t const chainSize = ZSTD_allocateChainTable(cdict_cParams->strategy, cdict->useRowMatchFi… in ZSTD_resetCCtx_byCopyingCDict()
2368 …if (ZSTD_allocateChainTable(cctx->appliedParams.cParams.strategy, cctx->appliedParams.useRowMatchF… in ZSTD_resetCCtx_byCopyingCDict()
2374 if (ZSTD_rowMatchFinderUsed(cdict_cParams->strategy, cdict->useRowMatchFinder)) { in ZSTD_resetCCtx_byCopyingCDict()
2412 * in-place. We decide here which strategy to use. */
2464 assert(dstCCtx->appliedParams.cParams.strategy == srcCCtx->appliedParams.cParams.strategy); in ZSTD_copyCCtx_internal()
2473 { size_t const chainSize = ZSTD_allocateChainTable(srcCCtx->appliedParams.cParams.strategy, in ZSTD_copyCCtx_internal()
2534 * PreserveMark preserves "unsorted mark" for btlazy2 strategy.
2586 …if (ZSTD_allocateChainTable(params->cParams.strategy, params->useRowMatchFinder, (U32)ms->dedicate… in ZSTD_reduceIndex()
2588 if (params->cParams.strategy == ZSTD_btlazy2) in ZSTD_reduceIndex()
2681 ZSTD_strategy strategy, unsigned* countWorkspace, in ZSTD_buildSequencesStatistics() argument
2709 ZSTD_defaultAllowed, strategy); in ZSTD_buildSequencesStatistics()
2742 defaultPolicy, strategy); in ZSTD_buildSequencesStatistics()
2772 ZSTD_defaultAllowed, strategy); in ZSTD_buildSequencesStatistics()
2812 ZSTD_strategy const strategy = cctxParams->cParams.strategy; in ZSTD_entropyCompressSeqStore_internal() local
2845 cctxParams->cParams.strategy, in ZSTD_entropyCompressSeqStore_internal()
2879 strategy, count, in ZSTD_entropyCompressSeqStore_internal()
2947 { size_t const maxCSize = blockSize - ZSTD_minGain(blockSize, cctxParams->cParams.strategy); in ZSTD_entropyCompressSeqStore_wExtLitBuffer()
2982 * assumption : strat is a valid strategy */
3188 if (zc->appliedParams.cParams.strategy >= ZSTD_btopt) { in ZSTD_buildSeqStore()
3317 zc->appliedParams.cParams.strategy, in ZSTD_buildSeqStore()
3330 zc->appliedParams.cParams.strategy, in ZSTD_buildSeqStore()
3681 ZSTD_strategy const strategy = cctxParams->cParams.strategy; in ZSTD_buildBlockEntropyStats_sequences() local
3694 strategy, countWorkspace, in ZSTD_buildBlockEntropyStats_sequences()
3721 int const huf_useOptDepth = (cctxParams->cParams.strategy >= HUF_OPTIMAL_DEPTH_THRESHOLD); in ZSTD_buildBlockEntropyStats()
4403 srcSize - ZSTD_minGain(srcSize, zc->appliedParams.cParams.strategy); in ZSTD_compressBlock_targetCBlockSize_body()
4446 U32 const cycleLog = ZSTD_cycleLog(params->cParams.chainLog, params->cParams.strategy); in ZSTD_overflowCorrectIfNeeded()
4468 /* split level based on compression strategy, from `fast` to `btultra2` */ in ZSTD_optimalBlockSize()
4530 cctx->appliedParams.cParams.strategy, in ZSTD_compress_frameChunk()
4893 switch(params->cParams.strategy) in ZSTD_loadDictionaryContent()
4949 assert(0); /* not possible : not a valid strategy id */ in ZSTD_loadDictionaryContent()
7471 switch (cParams.strategy) { in ZSTD_dedicatedDictSearch_getCParams()
7492 return (cParams->strategy >= ZSTD_greedy) in ZSTD_dedicatedDictSearch_isSupported()
7493 && (cParams->strategy <= ZSTD_lazy2) in ZSTD_dedicatedDictSearch_isSupported()
7505 switch (cParams->strategy) { in ZSTD_dedicatedDictSearch_revertCParams()
7564 …"ZSTD_getCParams_internal selected tableID: %u row: %u strat: %u", tableID, row, (U32)cp.strategy); in ZSTD_getCParams_internal()