Lines Matching refs:ms

382 static U32 ZSTD_insertAndFindFirstIndexHash3 (const ZSTD_matchState_t* ms,  in ZSTD_insertAndFindFirstIndexHash3()  argument
386 U32* const hashTable3 = ms->hashTable3; in ZSTD_insertAndFindFirstIndexHash3()
387 U32 const hashLog3 = ms->hashLog3; in ZSTD_insertAndFindFirstIndexHash3()
388 const BYTE* const base = ms->window.base; in ZSTD_insertAndFindFirstIndexHash3()
412 const ZSTD_matchState_t* ms, in ZSTD_insertBt1() argument
417 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_insertBt1()
418 U32* const hashTable = ms->hashTable; in ZSTD_insertBt1()
421 U32* const bt = ms->chainTable; in ZSTD_insertBt1()
426 const BYTE* const base = ms->window.base; in ZSTD_insertBt1()
427 const BYTE* const dictBase = ms->window.dictBase; in ZSTD_insertBt1()
428 const U32 dictLimit = ms->window.dictLimit; in ZSTD_insertBt1()
440 U32 const windowLow = ZSTD_getLowestMatchIndex(ms, target, cParams->windowLog); in ZSTD_insertBt1()
531 ZSTD_matchState_t* ms, in ZSTD_updateTree_internal() argument
535 const BYTE* const base = ms->window.base; in ZSTD_updateTree_internal()
537 U32 idx = ms->nextToUpdate; in ZSTD_updateTree_internal()
542 … U32 const forward = ZSTD_insertBt1(ms, base+idx, iend, target, mls, dictMode == ZSTD_extDict); in ZSTD_updateTree_internal()
548 ms->nextToUpdate = target; in ZSTD_updateTree_internal()
551 void ZSTD_updateTree(ZSTD_matchState_t* ms, const BYTE* ip, const BYTE* iend) { in ZSTD_updateTree() argument
552 ZSTD_updateTree_internal(ms, ip, iend, ms->cParams.minMatch, ZSTD_noDict); in ZSTD_updateTree()
558 ZSTD_matchState_t* ms, in ZSTD_insertBtAndGetAllMatches() argument
566 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_insertBtAndGetAllMatches()
568 const BYTE* const base = ms->window.base; in ZSTD_insertBtAndGetAllMatches()
572 U32* const hashTable = ms->hashTable; in ZSTD_insertBtAndGetAllMatches()
575 U32* const bt = ms->chainTable; in ZSTD_insertBtAndGetAllMatches()
579 const BYTE* const dictBase = ms->window.dictBase; in ZSTD_insertBtAndGetAllMatches()
580 U32 const dictLimit = ms->window.dictLimit; in ZSTD_insertBtAndGetAllMatches()
584 U32 const windowLow = ZSTD_getLowestMatchIndex(ms, curr, cParams->windowLog); in ZSTD_insertBtAndGetAllMatches()
593 const ZSTD_matchState_t* dms = dictMode == ZSTD_dictMatchState ? ms->dictMatchState : NULL; in ZSTD_insertBtAndGetAllMatches()
657 U32 const matchIndex3 = ZSTD_insertAndFindFirstIndexHash3(ms, nextToUpdate3, ip); in ZSTD_insertBtAndGetAllMatches()
681 ms->nextToUpdate = curr+1; /* skip insertion */ in ZSTD_insertBtAndGetAllMatches()
781 ms->nextToUpdate = matchEndIdx - 8; /* skip repetitive patterns */ in ZSTD_insertBtAndGetAllMatches()
797 ZSTD_matchState_t* ms, in ZSTD_btGetAllMatches_internal() argument
807 assert(BOUNDED(3, ms->cParams.minMatch, 6) == mls); in ZSTD_btGetAllMatches_internal()
809 if (ip < ms->window.base + ms->nextToUpdate) in ZSTD_btGetAllMatches_internal()
811 ZSTD_updateTree_internal(ms, ip, iHighLimit, mls, dictMode); in ZSTD_btGetAllMatches_internal()
812 …return ZSTD_insertBtAndGetAllMatches(matches, ms, nextToUpdate3, ip, iHighLimit, dictMode, rep, ll… in ZSTD_btGetAllMatches_internal()
820 ZSTD_matchState_t* ms, \
829 matches, ms, nextToUpdate3, ip, iHighLimit, \
852 ZSTD_selectBtGetAllMatches(ZSTD_matchState_t const* ms, ZSTD_dictMode_e const dictMode)
859 U32 const mls = BOUNDED(3, ms->cParams.minMatch, 6);
1037 ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms, in ZSTD_compressBlock_opt_generic() argument
1044 optState_t* const optStatePtr = &ms->opt; in ZSTD_compressBlock_opt_generic()
1050 const BYTE* const base = ms->window.base; in ZSTD_compressBlock_opt_generic()
1051 const BYTE* const prefixStart = base + ms->window.dictLimit; in ZSTD_compressBlock_opt_generic()
1052 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_compressBlock_opt_generic()
1054 ZSTD_getAllMatchesFn getAllMatches = ZSTD_selectBtGetAllMatches(ms, dictMode); in ZSTD_compressBlock_opt_generic()
1058 U32 nextToUpdate3 = ms->nextToUpdate; in ZSTD_compressBlock_opt_generic()
1065 optLdm.seqStore = ms->ldmSeqStore ? *ms->ldmSeqStore : kNullRawSeqStore; in ZSTD_compressBlock_opt_generic()
1071 (U32)(ip - base), ms->window.dictLimit, ms->nextToUpdate); in ZSTD_compressBlock_opt_generic()
1083 … U32 nbMatches = getAllMatches(matches, ms, &nextToUpdate3, ip, iend, rep, ll0, minMatch); in ZSTD_compressBlock_opt_generic()
1200 …U32 nbMatches = getAllMatches(matches, ms, &nextToUpdate3, inr, iend, opt[cur].rep, ll0, minMatch); in ZSTD_compressBlock_opt_generic()
1325 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_opt0() argument
1328 …return ZSTD_compressBlock_opt_generic(ms, seqStore, rep, src, srcSize, 0 /* optLevel */, dictMode); in ZSTD_compressBlock_opt0()
1332 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_opt2() argument
1335 …return ZSTD_compressBlock_opt_generic(ms, seqStore, rep, src, srcSize, 2 /* optLevel */, dictMode); in ZSTD_compressBlock_opt2()
1339 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_btopt() argument
1343 return ZSTD_compressBlock_opt0(ms, seqStore, rep, src, srcSize, ZSTD_noDict); in ZSTD_compressBlock_btopt()
1355 ZSTD_initStats_ultra(ZSTD_matchState_t* ms, in ZSTD_initStats_ultra() argument
1364 assert(ms->opt.litLengthSum == 0); /* first block */ in ZSTD_initStats_ultra()
1366 assert(ms->window.dictLimit == ms->window.lowLimit); /* no dictionary */ in ZSTD_initStats_ultra()
1367 …assert(ms->window.dictLimit - ms->nextToUpdate <= 1); /* no prefix (note: intentional overflow, d… in ZSTD_initStats_ultra()
1369 …ZSTD_compressBlock_opt2(ms, seqStore, tmpRep, src, srcSize, ZSTD_noDict); /* generate stats into… in ZSTD_initStats_ultra()
1373 ms->window.base -= srcSize; in ZSTD_initStats_ultra()
1374 ms->window.dictLimit += (U32)srcSize; in ZSTD_initStats_ultra()
1375 ms->window.lowLimit = ms->window.dictLimit; in ZSTD_initStats_ultra()
1376 ms->nextToUpdate = ms->window.dictLimit; in ZSTD_initStats_ultra()
1381 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_btultra() argument
1385 return ZSTD_compressBlock_opt2(ms, seqStore, rep, src, srcSize, ZSTD_noDict); in ZSTD_compressBlock_btultra()
1389 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_btultra2() argument
1392 U32 const curr = (U32)((const BYTE*)src - ms->window.base); in ZSTD_compressBlock_btultra2()
1404 if ( (ms->opt.litLengthSum==0) /* first block */ in ZSTD_compressBlock_btultra2()
1406 && (ms->window.dictLimit == ms->window.lowLimit) /* no dictionary */ in ZSTD_compressBlock_btultra2()
1407 && (curr == ms->window.dictLimit) /* start of frame, nothing already loaded nor skipped */ in ZSTD_compressBlock_btultra2()
1410 ZSTD_initStats_ultra(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_btultra2()
1413 return ZSTD_compressBlock_opt2(ms, seqStore, rep, src, srcSize, ZSTD_noDict); in ZSTD_compressBlock_btultra2()
1417 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_btopt_dictMatchState() argument
1420 return ZSTD_compressBlock_opt0(ms, seqStore, rep, src, srcSize, ZSTD_dictMatchState); in ZSTD_compressBlock_btopt_dictMatchState()
1424 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_btultra_dictMatchState() argument
1427 return ZSTD_compressBlock_opt2(ms, seqStore, rep, src, srcSize, ZSTD_dictMatchState); in ZSTD_compressBlock_btultra_dictMatchState()
1431 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_btopt_extDict() argument
1434 return ZSTD_compressBlock_opt0(ms, seqStore, rep, src, srcSize, ZSTD_extDict); in ZSTD_compressBlock_btopt_extDict()
1438 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_btultra_extDict() argument
1441 return ZSTD_compressBlock_opt2(ms, seqStore, rep, src, srcSize, ZSTD_extDict); in ZSTD_compressBlock_btultra_extDict()