Lines Matching refs:ms
412 U32 ZSTD_insertAndFindFirstIndexHash3 (const ZSTD_MatchState_t* ms, in ZSTD_insertAndFindFirstIndexHash3() argument
416 U32* const hashTable3 = ms->hashTable3; in ZSTD_insertAndFindFirstIndexHash3()
417 U32 const hashLog3 = ms->hashLog3; in ZSTD_insertAndFindFirstIndexHash3()
418 const BYTE* const base = ms->window.base; in ZSTD_insertAndFindFirstIndexHash3()
444 const ZSTD_MatchState_t* ms, in ZSTD_insertBt1() argument
449 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_insertBt1()
450 U32* const hashTable = ms->hashTable; in ZSTD_insertBt1()
453 U32* const bt = ms->chainTable; in ZSTD_insertBt1()
458 const BYTE* const base = ms->window.base; in ZSTD_insertBt1()
459 const BYTE* const dictBase = ms->window.dictBase; in ZSTD_insertBt1()
460 const U32 dictLimit = ms->window.dictLimit; in ZSTD_insertBt1()
472 U32 const windowLow = ZSTD_getLowestMatchIndex(ms, target, cParams->windowLog); in ZSTD_insertBt1()
564 ZSTD_MatchState_t* ms, in ZSTD_updateTree_internal() argument
568 const BYTE* const base = ms->window.base; in ZSTD_updateTree_internal()
570 U32 idx = ms->nextToUpdate; in ZSTD_updateTree_internal()
575 … U32 const forward = ZSTD_insertBt1(ms, base+idx, iend, target, mls, dictMode == ZSTD_extDict); in ZSTD_updateTree_internal()
581 ms->nextToUpdate = target; in ZSTD_updateTree_internal()
584 void ZSTD_updateTree(ZSTD_MatchState_t* ms, const BYTE* ip, const BYTE* iend) { in ZSTD_updateTree() argument
585 ZSTD_updateTree_internal(ms, ip, iend, ms->cParams.minMatch, ZSTD_noDict); in ZSTD_updateTree()
593 ZSTD_MatchState_t* ms, in ZSTD_insertBtAndGetAllMatches() argument
602 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_insertBtAndGetAllMatches()
604 const BYTE* const base = ms->window.base; in ZSTD_insertBtAndGetAllMatches()
608 U32* const hashTable = ms->hashTable; in ZSTD_insertBtAndGetAllMatches()
611 U32* const bt = ms->chainTable; in ZSTD_insertBtAndGetAllMatches()
615 const BYTE* const dictBase = ms->window.dictBase; in ZSTD_insertBtAndGetAllMatches()
616 U32 const dictLimit = ms->window.dictLimit; in ZSTD_insertBtAndGetAllMatches()
620 U32 const windowLow = ZSTD_getLowestMatchIndex(ms, curr, cParams->windowLog); in ZSTD_insertBtAndGetAllMatches()
629 const ZSTD_MatchState_t* dms = dictMode == ZSTD_dictMatchState ? ms->dictMatchState : NULL; in ZSTD_insertBtAndGetAllMatches()
693 U32 const matchIndex3 = ZSTD_insertAndFindFirstIndexHash3(ms, nextToUpdate3, ip); in ZSTD_insertBtAndGetAllMatches()
717 ms->nextToUpdate = curr+1; /* skip insertion */ in ZSTD_insertBtAndGetAllMatches()
817 ms->nextToUpdate = matchEndIdx - 8; /* skip repetitive patterns */ in ZSTD_insertBtAndGetAllMatches()
835 ZSTD_MatchState_t* ms, in ZSTD_btGetAllMatches_internal() argument
845 assert(BOUNDED(3, ms->cParams.minMatch, 6) == mls); in ZSTD_btGetAllMatches_internal()
847 if (ip < ms->window.base + ms->nextToUpdate) in ZSTD_btGetAllMatches_internal()
849 ZSTD_updateTree_internal(ms, ip, iHighLimit, mls, dictMode); in ZSTD_btGetAllMatches_internal()
850 …return ZSTD_insertBtAndGetAllMatches(matches, ms, nextToUpdate3, ip, iHighLimit, dictMode, rep, ll… in ZSTD_btGetAllMatches_internal()
858 ZSTD_MatchState_t* ms, \
867 matches, ms, nextToUpdate3, ip, iHighLimit, \
890 ZSTD_selectBtGetAllMatches(ZSTD_MatchState_t const* ms, ZSTD_dictMode_e const dictMode)
897 U32 const mls = BOUNDED(3, ms->cParams.minMatch, 6);
1078 ZSTD_compressBlock_opt_generic(ZSTD_MatchState_t* ms, in ZSTD_compressBlock_opt_generic() argument
1085 optState_t* const optStatePtr = &ms->opt; in ZSTD_compressBlock_opt_generic()
1091 const BYTE* const base = ms->window.base; in ZSTD_compressBlock_opt_generic()
1092 const BYTE* const prefixStart = base + ms->window.dictLimit; in ZSTD_compressBlock_opt_generic()
1093 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_compressBlock_opt_generic()
1095 ZSTD_getAllMatchesFn getAllMatches = ZSTD_selectBtGetAllMatches(ms, dictMode); in ZSTD_compressBlock_opt_generic()
1099 U32 nextToUpdate3 = ms->nextToUpdate; in ZSTD_compressBlock_opt_generic()
1108 optLdm.seqStore = ms->ldmSeqStore ? *ms->ldmSeqStore : kNullRawSeqStore; in ZSTD_compressBlock_opt_generic()
1114 (U32)(ip - base), ms->window.dictLimit, ms->nextToUpdate); in ZSTD_compressBlock_opt_generic()
1126 … U32 nbMatches = getAllMatches(matches, ms, &nextToUpdate3, ip, iend, rep, ll0, minMatch); in ZSTD_compressBlock_opt_generic()
1279 …U32 nbMatches = getAllMatches(matches, ms, &nextToUpdate3, inr, iend, opt[cur].rep, ll0, minMatch); in ZSTD_compressBlock_opt_generic()
1448 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_opt0() argument
1451 …return ZSTD_compressBlock_opt_generic(ms, seqStore, rep, src, srcSize, 0 /* optLevel */, dictMode); in ZSTD_compressBlock_opt0()
1457 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_opt2() argument
1460 …return ZSTD_compressBlock_opt_generic(ms, seqStore, rep, src, srcSize, 2 /* optLevel */, dictMode); in ZSTD_compressBlock_opt2()
1466 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_btopt() argument
1470 return ZSTD_compressBlock_opt0(ms, seqStore, rep, src, srcSize, ZSTD_noDict); in ZSTD_compressBlock_btopt()
1485 void ZSTD_initStats_ultra(ZSTD_MatchState_t* ms, in ZSTD_initStats_ultra() argument
1494 assert(ms->opt.litLengthSum == 0); /* first block */ in ZSTD_initStats_ultra()
1496 assert(ms->window.dictLimit == ms->window.lowLimit); /* no dictionary */ in ZSTD_initStats_ultra()
1497 …assert(ms->window.dictLimit - ms->nextToUpdate <= 1); /* no prefix (note: intentional overflow, d… in ZSTD_initStats_ultra()
1499 …ZSTD_compressBlock_opt2(ms, seqStore, tmpRep, src, srcSize, ZSTD_noDict); /* generate stats into… in ZSTD_initStats_ultra()
1503 ms->window.base -= srcSize; in ZSTD_initStats_ultra()
1504 ms->window.dictLimit += (U32)srcSize; in ZSTD_initStats_ultra()
1505 ms->window.lowLimit = ms->window.dictLimit; in ZSTD_initStats_ultra()
1506 ms->nextToUpdate = ms->window.dictLimit; in ZSTD_initStats_ultra()
1511 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_btultra() argument
1515 return ZSTD_compressBlock_opt2(ms, seqStore, rep, src, srcSize, ZSTD_noDict); in ZSTD_compressBlock_btultra()
1519 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_btultra2() argument
1522 U32 const curr = (U32)((const BYTE*)src - ms->window.base); in ZSTD_compressBlock_btultra2()
1534 if ( (ms->opt.litLengthSum==0) /* first block */ in ZSTD_compressBlock_btultra2()
1536 && (ms->window.dictLimit == ms->window.lowLimit) /* no dictionary */ in ZSTD_compressBlock_btultra2()
1537 && (curr == ms->window.dictLimit) /* start of frame, nothing already loaded nor skipped */ in ZSTD_compressBlock_btultra2()
1540 ZSTD_initStats_ultra(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_btultra2()
1543 return ZSTD_compressBlock_opt2(ms, seqStore, rep, src, srcSize, ZSTD_noDict); in ZSTD_compressBlock_btultra2()
1549 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_btopt_dictMatchState() argument
1552 return ZSTD_compressBlock_opt0(ms, seqStore, rep, src, srcSize, ZSTD_dictMatchState); in ZSTD_compressBlock_btopt_dictMatchState()
1556 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_btopt_extDict() argument
1559 return ZSTD_compressBlock_opt0(ms, seqStore, rep, src, srcSize, ZSTD_extDict); in ZSTD_compressBlock_btopt_extDict()
1565 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_btultra_dictMatchState() argument
1568 return ZSTD_compressBlock_opt2(ms, seqStore, rep, src, srcSize, ZSTD_dictMatchState); in ZSTD_compressBlock_btultra_dictMatchState()
1572 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_btultra_extDict() argument
1575 return ZSTD_compressBlock_opt2(ms, seqStore, rep, src, srcSize, ZSTD_extDict); in ZSTD_compressBlock_btultra_extDict()