• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/contrib/zstd/lib/compress/

Lines Matching refs:ms

1488 static void ZSTD_invalidateMatchState(ZSTD_matchState_t* ms)
1490 ZSTD_window_clear(&ms->window);
1492 ms->nextToUpdate = ms->window.dictLimit;
1493 ms->loadedDictEnd = 0;
1494 ms->opt.litLengthSum = 0; /* force reset of btopt stats */
1495 ms->dictMatchState = NULL;
1526 ZSTD_reset_matchState(ZSTD_matchState_t* ms,
1540 ZSTD_window_init(&ms->window);
1544 ms->hashLog3 = hashLog3;
1546 ZSTD_invalidateMatchState(ms);
1554 ms->hashTable = (U32*)ZSTD_cwksp_reserve_table(ws, hSize * sizeof(U32));
1555 ms->chainTable = (U32*)ZSTD_cwksp_reserve_table(ws, chainSize * sizeof(U32));
1556 ms->hashTable3 = (U32*)ZSTD_cwksp_reserve_table(ws, h3Size * sizeof(U32));
1569 ms->opt.litFreq = (unsigned*)ZSTD_cwksp_reserve_aligned(ws, (1<<Litbits) * sizeof(unsigned));
1570 ms->opt.litLengthFreq = (unsigned*)ZSTD_cwksp_reserve_aligned(ws, (MaxLL+1) * sizeof(unsigned));
1571 ms->opt.matchLengthFreq = (unsigned*)ZSTD_cwksp_reserve_aligned(ws, (MaxML+1) * sizeof(unsigned));
1572 ms->opt.offCodeFreq = (unsigned*)ZSTD_cwksp_reserve_aligned(ws, (MaxOff+1) * sizeof(unsigned));
1573 ms->opt.matchTable = (ZSTD_match_t*)ZSTD_cwksp_reserve_aligned(ws, (ZSTD_OPT_NUM+1) * sizeof(ZSTD_match_t));
1574 ms->opt.priceTable = (ZSTD_optimal_t*)ZSTD_cwksp_reserve_aligned(ws, (ZSTD_OPT_NUM+1) * sizeof(ZSTD_optimal_t));
1577 ms->cParams = *cParams;
2088 static void ZSTD_reduceIndex (ZSTD_matchState_t* ms, ZSTD_CCtx_params const* params, const U32 reducerValue)
2091 ZSTD_reduceTable(ms->hashTable, hSize, reducerValue);
2097 ZSTD_reduceTable_btlazy2(ms->chainTable, chainSize, reducerValue);
2099 ZSTD_reduceTable(ms->chainTable, chainSize, reducerValue);
2102 if (ms->hashLog3) {
2103 U32 const h3Size = (U32)1 << ms->hashLog3;
2104 ZSTD_reduceTable(ms->hashTable3, h3Size, reducerValue);
2444 ZSTD_matchState_t* const ms = &zc->blockState.matchState;
2447 /* Assert that we have correctly flushed the ctx params into the ms's copy */
2448 ZSTD_assertEqualCParams(zc->appliedParams.cParams, ms->cParams);
2459 ms->opt.symbolCosts = &zc->blockState.prevCBlock->entropy;
2461 ms->opt.literalCompressionMode = zc->appliedParams.literalCompressionMode;
2465 assert(ms->dictMatchState == NULL || ms->loadedDictEnd == ms->window.dictLimit);
2468 { const BYTE* const base = ms->window.base;
2472 if (curr > ms->nextToUpdate + 384)
2473 ms->nextToUpdate = curr - MIN(192, (U32)(curr - ms->nextToUpdate - 384));
2477 { ZSTD_dictMode_e const dictMode = ZSTD_matchState_dictMode(ms);
2488 ms, &zc->seqStore,
2504 ms, &zc->seqStore,
2510 ms->ldmSeqStore = NULL;
2511 lastLLSize = blockCompressor(ms, &zc->seqStore, zc->blockState.nextCBlock->rep, src, srcSize);
2807 static void ZSTD_overflowCorrectIfNeeded(ZSTD_matchState_t* ms,
2813 if (ZSTD_window_needOverflowCorrection(ms->window, iend)) {
2816 U32 const correction = ZSTD_window_correctOverflow(&ms->window, cycleLog, maxDist, ip);
2821 ZSTD_reduceIndex(ms, params, correction);
2823 if (ms->nextToUpdate < correction) ms->nextToUpdate = 0;
2824 else ms->nextToUpdate -= correction;
2826 ms->loadedDictEnd = 0;
2827 ms->dictMatchState = NULL;
2857 ZSTD_matchState_t* const ms = &cctx->blockState.matchState;
2866 ms, &cctx->workspace, &cctx->appliedParams, ip, ip + blockSize);
2867 ZSTD_checkDictValidity(&ms->window, ip + blockSize, maxDist, &ms->loadedDictEnd, &ms->dictMatchState);
2870 if (ms->nextToUpdate < ms->window.lowLimit) ms->nextToUpdate = ms->window.lowLimit;
2993 ZSTD_matchState_t* const ms = &cctx->blockState.matchState;
3013 if (!ZSTD_window_update(&ms->window, src, srcSize)) {
3014 ms->nextToUpdate = ms->window.dictLimit;
3023 ms, &cctx->workspace, &cctx->appliedParams,
3076 static size_t ZSTD_loadDictionaryContent(ZSTD_matchState_t* ms,
3086 ZSTD_window_update(&ms->window, src, srcSize);
3087 ms->loadedDictEnd = params->forceWindow ? 0 : (U32)(iend - ms->window.base);
3094 /* Assert that we the ms params match the params we're being given */
3095 ZSTD_assertEqualCParams(params->cParams, ms->cParams);
3104 ZSTD_overflowCorrectIfNeeded(ms, ws, params, ip, ichunk);
3112 ZSTD_fillHashTable(ms, ichunk, dtlm);
3115 ZSTD_fillDoubleHashTable(ms, ichunk, dtlm);
3121 if (chunk >= HASH_READ_SIZE && ms->dedicatedDictSearch) {
3123 ZSTD_dedicatedDictSearch_lazy_loadDictionary(ms, ichunk-HASH_READ_SIZE);
3125 ZSTD_insertAndFindFirstIndex(ms, ichunk-HASH_READ_SIZE);
3134 ZSTD_updateTree(ms, ichunk-HASH_READ_SIZE, ichunk);
3144 ms->nextToUpdate = (U32)(iend - ms->window.base);
3269 ZSTD_matchState_t* ms,
3293 ms, NULL, ws, params, dictPtr, dictContentSize, dtlm), "");
3302 ZSTD_matchState_t* ms,
3321 return ZSTD_loadDictionaryContent(ms, ls, ws, params, dict, dictSize, dtlm);
3327 ms, ls, ws, params, dict, dictSize, dtlm);
3335 bs, ms, ws, params, dict, dictSize, dtlm, workspace);