Lines Matching refs:ms
353 static U32 ZSTD_insertAndFindFirstIndexHash3 (ZSTD_matchState_t* ms, in ZSTD_insertAndFindFirstIndexHash3() argument
357 U32* const hashTable3 = ms->hashTable3; in ZSTD_insertAndFindFirstIndexHash3()
358 U32 const hashLog3 = ms->hashLog3; in ZSTD_insertAndFindFirstIndexHash3()
359 const BYTE* const base = ms->window.base; in ZSTD_insertAndFindFirstIndexHash3()
382 ZSTD_matchState_t* ms, in ZSTD_insertBt1() argument
386 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_insertBt1()
387 U32* const hashTable = ms->hashTable; in ZSTD_insertBt1()
390 U32* const bt = ms->chainTable; in ZSTD_insertBt1()
395 const BYTE* const base = ms->window.base; in ZSTD_insertBt1()
396 const BYTE* const dictBase = ms->window.dictBase; in ZSTD_insertBt1()
397 const U32 dictLimit = ms->window.dictLimit; in ZSTD_insertBt1()
406 U32 const windowLow = ms->window.lowLimit; in ZSTD_insertBt1()
496 ZSTD_matchState_t* ms, in ZSTD_updateTree_internal() argument
500 const BYTE* const base = ms->window.base; in ZSTD_updateTree_internal()
502 U32 idx = ms->nextToUpdate; in ZSTD_updateTree_internal()
507 U32 const forward = ZSTD_insertBt1(ms, base+idx, iend, mls, dictMode == ZSTD_extDict); in ZSTD_updateTree_internal()
513 ms->nextToUpdate = target; in ZSTD_updateTree_internal()
516 void ZSTD_updateTree(ZSTD_matchState_t* ms, const BYTE* ip, const BYTE* iend) { in ZSTD_updateTree() argument
517 ZSTD_updateTree_internal(ms, ip, iend, ms->cParams.minMatch, ZSTD_noDict); in ZSTD_updateTree()
523 ZSTD_matchState_t* ms, in ZSTD_insertBtAndGetAllMatches() argument
531 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_insertBtAndGetAllMatches()
533 const BYTE* const base = ms->window.base; in ZSTD_insertBtAndGetAllMatches()
537 U32* const hashTable = ms->hashTable; in ZSTD_insertBtAndGetAllMatches()
540 U32* const bt = ms->chainTable; in ZSTD_insertBtAndGetAllMatches()
544 const BYTE* const dictBase = ms->window.dictBase; in ZSTD_insertBtAndGetAllMatches()
545 U32 const dictLimit = ms->window.dictLimit; in ZSTD_insertBtAndGetAllMatches()
549 U32 const windowLow = ZSTD_getLowestMatchIndex(ms, curr, cParams->windowLog); in ZSTD_insertBtAndGetAllMatches()
558 const ZSTD_matchState_t* dms = dictMode == ZSTD_dictMatchState ? ms->dictMatchState : NULL; in ZSTD_insertBtAndGetAllMatches()
622 U32 const matchIndex3 = ZSTD_insertAndFindFirstIndexHash3(ms, nextToUpdate3, ip); in ZSTD_insertBtAndGetAllMatches()
646 ms->nextToUpdate = curr+1; /* skip insertion */ in ZSTD_insertBtAndGetAllMatches()
750 ms->nextToUpdate = matchEndIdx - 8; /* skip repetitive patterns */ in ZSTD_insertBtAndGetAllMatches()
757 ZSTD_matchState_t* ms, in ZSTD_BtGetAllMatches() argument
764 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_BtGetAllMatches()
767 if (ip < ms->window.base + ms->nextToUpdate) return 0; /* skipped area */ in ZSTD_BtGetAllMatches()
768 ZSTD_updateTree_internal(ms, ip, iHighLimit, matchLengthSearch, dictMode); in ZSTD_BtGetAllMatches()
771 …case 3 : return ZSTD_insertBtAndGetAllMatches(matches, ms, nextToUpdate3, ip, iHighLimit, dictMode… in ZSTD_BtGetAllMatches()
773 …case 4 : return ZSTD_insertBtAndGetAllMatches(matches, ms, nextToUpdate3, ip, iHighLimit, dictMode… in ZSTD_BtGetAllMatches()
774 …case 5 : return ZSTD_insertBtAndGetAllMatches(matches, ms, nextToUpdate3, ip, iHighLimit, dictMode… in ZSTD_BtGetAllMatches()
776 …case 6 : return ZSTD_insertBtAndGetAllMatches(matches, ms, nextToUpdate3, ip, iHighLimit, dictMode… in ZSTD_BtGetAllMatches()
943 ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms, in ZSTD_compressBlock_opt_generic() argument
950 optState_t* const optStatePtr = &ms->opt; in ZSTD_compressBlock_opt_generic()
956 const BYTE* const base = ms->window.base; in ZSTD_compressBlock_opt_generic()
957 const BYTE* const prefixStart = base + ms->window.dictLimit; in ZSTD_compressBlock_opt_generic()
958 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_compressBlock_opt_generic()
962 U32 nextToUpdate3 = ms->nextToUpdate; in ZSTD_compressBlock_opt_generic()
969 optLdm.seqStore = ms->ldmSeqStore ? *ms->ldmSeqStore : kNullRawSeqStore; in ZSTD_compressBlock_opt_generic()
975 (U32)(ip - base), ms->window.dictLimit, ms->nextToUpdate); in ZSTD_compressBlock_opt_generic()
987 …U32 nbMatches = ZSTD_BtGetAllMatches(matches, ms, &nextToUpdate3, ip, iend, dictMode, rep, ll0, mi… in ZSTD_compressBlock_opt_generic()
1102 …U32 nbMatches = ZSTD_BtGetAllMatches(matches, ms, &nextToUpdate3, inr, iend, dictMode, opt[cur].re… in ZSTD_compressBlock_opt_generic()
1228 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_btopt() argument
1232 …return ZSTD_compressBlock_opt_generic(ms, seqStore, rep, src, srcSize, 0 /*optLevel*/, ZSTD_noDict… in ZSTD_compressBlock_btopt()
1265 ZSTD_initStats_ultra(ZSTD_matchState_t* ms, in ZSTD_initStats_ultra() argument
1274 assert(ms->opt.litLengthSum == 0); /* first block */ in ZSTD_initStats_ultra()
1276 assert(ms->window.dictLimit == ms->window.lowLimit); /* no dictionary */ in ZSTD_initStats_ultra()
1277 …assert(ms->window.dictLimit - ms->nextToUpdate <= 1); /* no prefix (note: intentional overflow, d… in ZSTD_initStats_ultra()
1279 …ZSTD_compressBlock_opt_generic(ms, seqStore, tmpRep, src, srcSize, 2 /*optLevel*/, ZSTD_noDict); … in ZSTD_initStats_ultra()
1283 ms->window.base -= srcSize; in ZSTD_initStats_ultra()
1284 ms->window.dictLimit += (U32)srcSize; in ZSTD_initStats_ultra()
1285 ms->window.lowLimit = ms->window.dictLimit; in ZSTD_initStats_ultra()
1286 ms->nextToUpdate = ms->window.dictLimit; in ZSTD_initStats_ultra()
1289 ZSTD_upscaleStats(&ms->opt); in ZSTD_initStats_ultra()
1293 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_btultra() argument
1297 …return ZSTD_compressBlock_opt_generic(ms, seqStore, rep, src, srcSize, 2 /*optLevel*/, ZSTD_noDict… in ZSTD_compressBlock_btultra()
1301 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_btultra2() argument
1304 U32 const curr = (U32)((const BYTE*)src - ms->window.base); in ZSTD_compressBlock_btultra2()
1316 if ( (ms->opt.litLengthSum==0) /* first block */ in ZSTD_compressBlock_btultra2()
1318 && (ms->window.dictLimit == ms->window.lowLimit) /* no dictionary */ in ZSTD_compressBlock_btultra2()
1319 && (curr == ms->window.dictLimit) /* start of frame, nothing already loaded nor skipped */ in ZSTD_compressBlock_btultra2()
1322 ZSTD_initStats_ultra(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_btultra2()
1325 …return ZSTD_compressBlock_opt_generic(ms, seqStore, rep, src, srcSize, 2 /*optLevel*/, ZSTD_noDict… in ZSTD_compressBlock_btultra2()
1329 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_btopt_dictMatchState() argument
1332 …return ZSTD_compressBlock_opt_generic(ms, seqStore, rep, src, srcSize, 0 /*optLevel*/, ZSTD_dictMa… in ZSTD_compressBlock_btopt_dictMatchState()
1336 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_btultra_dictMatchState() argument
1339 …return ZSTD_compressBlock_opt_generic(ms, seqStore, rep, src, srcSize, 2 /*optLevel*/, ZSTD_dictMa… in ZSTD_compressBlock_btultra_dictMatchState()
1343 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_btopt_extDict() argument
1346 …return ZSTD_compressBlock_opt_generic(ms, seqStore, rep, src, srcSize, 0 /*optLevel*/, ZSTD_extDic… in ZSTD_compressBlock_btopt_extDict()
1350 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_btultra_extDict() argument
1353 …return ZSTD_compressBlock_opt_generic(ms, seqStore, rep, src, srcSize, 2 /*optLevel*/, ZSTD_extDic… in ZSTD_compressBlock_btultra_extDict()