Lines Matching +full:1 +full:ms
20 ZSTD_updateDUBT(ZSTD_matchState_t* ms, in ZSTD_updateDUBT() argument
24 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_updateDUBT()
25 U32* const hashTable = ms->hashTable; in ZSTD_updateDUBT()
28 U32* const bt = ms->chainTable; in ZSTD_updateDUBT()
29 U32 const btLog = cParams->chainLog - 1; in ZSTD_updateDUBT()
30 U32 const btMask = (1 << btLog) - 1; in ZSTD_updateDUBT()
32 const BYTE* const base = ms->window.base; in ZSTD_updateDUBT()
34 U32 idx = ms->nextToUpdate; in ZSTD_updateDUBT()
38 idx, target, ms->window.dictLimit); in ZSTD_updateDUBT()
42 assert(idx >= ms->window.dictLimit); /* condition for valid base+idx */ in ZSTD_updateDUBT()
48 U32* const sortMarkPtr = nextCandidatePtr + 1; in ZSTD_updateDUBT()
55 ms->nextToUpdate = target; in ZSTD_updateDUBT()
64 ZSTD_insertDUBT1(ZSTD_matchState_t* ms, in ZSTD_insertDUBT1() argument
69 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_insertDUBT1()
70 U32* const bt = ms->chainTable; in ZSTD_insertDUBT1()
71 U32 const btLog = cParams->chainLog - 1; in ZSTD_insertDUBT1()
72 U32 const btMask = (1 << btLog) - 1; in ZSTD_insertDUBT1()
74 const BYTE* const base = ms->window.base; in ZSTD_insertDUBT1()
75 const BYTE* const dictBase = ms->window.dictBase; in ZSTD_insertDUBT1()
76 const U32 dictLimit = ms->window.dictLimit; in ZSTD_insertDUBT1()
83 U32* largerPtr = smallerPtr + 1; in ZSTD_insertDUBT1()
86 U32 const windowValid = ms->window.lowLimit; in ZSTD_insertDUBT1()
87 U32 const maxDistance = 1U << cParams->windowLog; in ZSTD_insertDUBT1()
101 * but it's still possible to have nextPtr[1] == ZSTD_DUBT_UNSORTED_MARK in ZSTD_insertDUBT1()
134 matchIndex, btLow, nextPtr[1]); in ZSTD_insertDUBT1()
135 …smallerPtr = nextPtr+1; /* new "candidate" => larger than match, which was smaller t… in ZSTD_insertDUBT1()
136 …matchIndex = nextPtr[1]; /* new matchIndex, larger than previous and closer to curren… in ZSTD_insertDUBT1()
154 ZSTD_matchState_t* ms, in ZSTD_DUBT_findBetterDictMatch() argument
162 const ZSTD_matchState_t * const dms = ms->dictMatchState; in ZSTD_DUBT_findBetterDictMatch()
169 const BYTE* const base = ms->window.base; in ZSTD_DUBT_findBetterDictMatch()
170 const BYTE* const prefixStart = base + ms->window.dictLimit; in ZSTD_DUBT_findBetterDictMatch()
176 U32 const dictIndexDelta = ms->window.lowLimit - dictHighLimit; in ZSTD_DUBT_findBetterDictMatch()
179 U32 const btLog = dmsCParams->chainLog - 1; in ZSTD_DUBT_findBetterDictMatch()
180 U32 const btMask = (1 << btLog) - 1; in ZSTD_DUBT_findBetterDictMatch()
198 …h-bestLength)) > (int)(ZSTD_highbit32(current-matchIndex+1) - ZSTD_highbit32((U32)offsetPtr[0]+1))… in ZSTD_DUBT_findBetterDictMatch()
211 …dictMatchIndex = nextPtr[1]; /* new matchIndex larger than previous (closer to curren… in ZSTD_DUBT_findBetterDictMatch()
231 ZSTD_DUBT_findBestMatch(ZSTD_matchState_t* ms, in ZSTD_DUBT_findBestMatch() argument
237 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_DUBT_findBestMatch()
238 U32* const hashTable = ms->hashTable; in ZSTD_DUBT_findBestMatch()
243 const BYTE* const base = ms->window.base; in ZSTD_DUBT_findBestMatch()
245 U32 const windowLow = ZSTD_getLowestMatchIndex(ms, current, cParams->windowLog); in ZSTD_DUBT_findBestMatch()
247 U32* const bt = ms->chainTable; in ZSTD_DUBT_findBestMatch()
248 U32 const btLog = cParams->chainLog - 1; in ZSTD_DUBT_findBestMatch()
249 U32 const btMask = (1 << btLog) - 1; in ZSTD_DUBT_findBestMatch()
254 U32* unsortedMark = bt + 2*(matchIndex&btMask) + 1; in ZSTD_DUBT_findBestMatch()
255 U32 nbCompares = 1U << cParams->searchLog; in ZSTD_DUBT_findBestMatch()
265 && (nbCandidates > 1) ) { in ZSTD_DUBT_findBestMatch()
272 unsortedMark = bt + 2*(matchIndex&btMask) + 1; in ZSTD_DUBT_findBestMatch()
288 U32* const nextCandidateIdxPtr = bt + 2*(matchIndex&btMask) + 1; in ZSTD_DUBT_findBestMatch()
290 ZSTD_insertDUBT1(ms, matchIndex, iend, in ZSTD_DUBT_findBestMatch()
298 const BYTE* const dictBase = ms->window.dictBase; in ZSTD_DUBT_findBestMatch()
299 const U32 dictLimit = ms->window.dictLimit; in ZSTD_DUBT_findBestMatch()
303 U32* largerPtr = bt + 2*(current&btMask) + 1; in ZSTD_DUBT_findBestMatch()
304 U32 matchEndIdx = current + 8 + 1; in ZSTD_DUBT_findBestMatch()
329 …h-bestLength)) > (int)(ZSTD_highbit32(current-matchIndex+1) - ZSTD_highbit32((U32)offsetPtr[0]+1))… in ZSTD_DUBT_findBestMatch()
346 smallerPtr = nextPtr+1; /* new "smaller" => larger of match */ in ZSTD_DUBT_findBestMatch()
347 …matchIndex = nextPtr[1]; /* new matchIndex larger than previous (closer to current) */ in ZSTD_DUBT_findBestMatch()
361 ms, ip, iend, in ZSTD_DUBT_findBestMatch()
367 ms->nextToUpdate = matchEndIdx - 8; /* skip repetitive patterns */ in ZSTD_DUBT_findBestMatch()
380 ZSTD_BtFindBestMatch( ZSTD_matchState_t* ms, in ZSTD_BtFindBestMatch() argument
387 if (ip < ms->window.base + ms->nextToUpdate) return 0; /* skipped area */ in ZSTD_BtFindBestMatch()
388 ZSTD_updateDUBT(ms, ip, iLimit, mls); in ZSTD_BtFindBestMatch()
389 return ZSTD_DUBT_findBestMatch(ms, ip, iLimit, offsetPtr, mls, dictMode); in ZSTD_BtFindBestMatch()
394 ZSTD_BtFindBestMatch_selectMLS ( ZSTD_matchState_t* ms, in ZSTD_BtFindBestMatch_selectMLS() argument
398 switch(ms->cParams.minMatch) in ZSTD_BtFindBestMatch_selectMLS()
401 case 4 : return ZSTD_BtFindBestMatch(ms, ip, iLimit, offsetPtr, 4, ZSTD_noDict); in ZSTD_BtFindBestMatch_selectMLS()
402 case 5 : return ZSTD_BtFindBestMatch(ms, ip, iLimit, offsetPtr, 5, ZSTD_noDict); in ZSTD_BtFindBestMatch_selectMLS()
404 case 6 : return ZSTD_BtFindBestMatch(ms, ip, iLimit, offsetPtr, 6, ZSTD_noDict); in ZSTD_BtFindBestMatch_selectMLS()
410 ZSTD_matchState_t* ms, in ZSTD_BtFindBestMatch_dictMatchState_selectMLS() argument
414 switch(ms->cParams.minMatch) in ZSTD_BtFindBestMatch_dictMatchState_selectMLS()
417 case 4 : return ZSTD_BtFindBestMatch(ms, ip, iLimit, offsetPtr, 4, ZSTD_dictMatchState); in ZSTD_BtFindBestMatch_dictMatchState_selectMLS()
418 case 5 : return ZSTD_BtFindBestMatch(ms, ip, iLimit, offsetPtr, 5, ZSTD_dictMatchState); in ZSTD_BtFindBestMatch_dictMatchState_selectMLS()
420 case 6 : return ZSTD_BtFindBestMatch(ms, ip, iLimit, offsetPtr, 6, ZSTD_dictMatchState); in ZSTD_BtFindBestMatch_dictMatchState_selectMLS()
426 ZSTD_matchState_t* ms, in ZSTD_BtFindBestMatch_extDict_selectMLS() argument
430 switch(ms->cParams.minMatch) in ZSTD_BtFindBestMatch_extDict_selectMLS()
433 case 4 : return ZSTD_BtFindBestMatch(ms, ip, iLimit, offsetPtr, 4, ZSTD_extDict); in ZSTD_BtFindBestMatch_extDict_selectMLS()
434 case 5 : return ZSTD_BtFindBestMatch(ms, ip, iLimit, offsetPtr, 5, ZSTD_extDict); in ZSTD_BtFindBestMatch_extDict_selectMLS()
436 case 6 : return ZSTD_BtFindBestMatch(ms, ip, iLimit, offsetPtr, 6, ZSTD_extDict); in ZSTD_BtFindBestMatch_extDict_selectMLS()
450 ZSTD_matchState_t* ms, in ZSTD_insertAndFindFirstIndex_internal() argument
454 U32* const hashTable = ms->hashTable; in ZSTD_insertAndFindFirstIndex_internal()
456 U32* const chainTable = ms->chainTable; in ZSTD_insertAndFindFirstIndex_internal()
457 const U32 chainMask = (1 << cParams->chainLog) - 1; in ZSTD_insertAndFindFirstIndex_internal()
458 const BYTE* const base = ms->window.base; in ZSTD_insertAndFindFirstIndex_internal()
460 U32 idx = ms->nextToUpdate; in ZSTD_insertAndFindFirstIndex_internal()
469 ms->nextToUpdate = target; in ZSTD_insertAndFindFirstIndex_internal()
473 U32 ZSTD_insertAndFindFirstIndex(ZSTD_matchState_t* ms, const BYTE* ip) { in ZSTD_insertAndFindFirstIndex() argument
474 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_insertAndFindFirstIndex()
475 return ZSTD_insertAndFindFirstIndex_internal(ms, cParams, ip, ms->cParams.minMatch); in ZSTD_insertAndFindFirstIndex()
482 ZSTD_matchState_t* ms, in ZSTD_HcFindBestMatch_generic() argument
487 const ZSTD_compressionParameters* const cParams = &ms->cParams; in ZSTD_HcFindBestMatch_generic()
488 U32* const chainTable = ms->chainTable; in ZSTD_HcFindBestMatch_generic()
489 const U32 chainSize = (1 << cParams->chainLog); in ZSTD_HcFindBestMatch_generic()
490 const U32 chainMask = chainSize-1; in ZSTD_HcFindBestMatch_generic()
491 const BYTE* const base = ms->window.base; in ZSTD_HcFindBestMatch_generic()
492 const BYTE* const dictBase = ms->window.dictBase; in ZSTD_HcFindBestMatch_generic()
493 const U32 dictLimit = ms->window.dictLimit; in ZSTD_HcFindBestMatch_generic()
497 const U32 maxDistance = 1U << cParams->windowLog; in ZSTD_HcFindBestMatch_generic()
498 const U32 lowestValid = ms->window.lowLimit; in ZSTD_HcFindBestMatch_generic()
500 const U32 isDictionary = (ms->loadedDictEnd != 0); in ZSTD_HcFindBestMatch_generic()
503 U32 nbAttempts = 1U << cParams->searchLog; in ZSTD_HcFindBestMatch_generic()
504 size_t ml=4-1; in ZSTD_HcFindBestMatch_generic()
507 U32 matchIndex = ZSTD_insertAndFindFirstIndex_internal(ms, cParams, ip, mls); in ZSTD_HcFindBestMatch_generic()
535 const ZSTD_matchState_t* const dms = ms->dictMatchState; in ZSTD_HcFindBestMatch_generic()
537 const U32 dmsChainSize = (1 << dms->cParams.chainLog); in ZSTD_HcFindBestMatch_generic()
538 const U32 dmsChainMask = dmsChainSize - 1; in ZSTD_HcFindBestMatch_generic()
572 ZSTD_matchState_t* ms, in ZSTD_HcFindBestMatch_selectMLS() argument
576 switch(ms->cParams.minMatch) in ZSTD_HcFindBestMatch_selectMLS()
579 case 4 : return ZSTD_HcFindBestMatch_generic(ms, ip, iLimit, offsetPtr, 4, ZSTD_noDict); in ZSTD_HcFindBestMatch_selectMLS()
580 case 5 : return ZSTD_HcFindBestMatch_generic(ms, ip, iLimit, offsetPtr, 5, ZSTD_noDict); in ZSTD_HcFindBestMatch_selectMLS()
582 case 6 : return ZSTD_HcFindBestMatch_generic(ms, ip, iLimit, offsetPtr, 6, ZSTD_noDict); in ZSTD_HcFindBestMatch_selectMLS()
588 ZSTD_matchState_t* ms, in ZSTD_HcFindBestMatch_dictMatchState_selectMLS() argument
592 switch(ms->cParams.minMatch) in ZSTD_HcFindBestMatch_dictMatchState_selectMLS()
595 case 4 : return ZSTD_HcFindBestMatch_generic(ms, ip, iLimit, offsetPtr, 4, ZSTD_dictMatchState); in ZSTD_HcFindBestMatch_dictMatchState_selectMLS()
596 case 5 : return ZSTD_HcFindBestMatch_generic(ms, ip, iLimit, offsetPtr, 5, ZSTD_dictMatchState); in ZSTD_HcFindBestMatch_dictMatchState_selectMLS()
598 case 6 : return ZSTD_HcFindBestMatch_generic(ms, ip, iLimit, offsetPtr, 6, ZSTD_dictMatchState); in ZSTD_HcFindBestMatch_dictMatchState_selectMLS()
604 ZSTD_matchState_t* ms, in ZSTD_HcFindBestMatch_extDict_selectMLS() argument
608 switch(ms->cParams.minMatch) in ZSTD_HcFindBestMatch_extDict_selectMLS()
611 case 4 : return ZSTD_HcFindBestMatch_generic(ms, ip, iLimit, offsetPtr, 4, ZSTD_extDict); in ZSTD_HcFindBestMatch_extDict_selectMLS()
612 case 5 : return ZSTD_HcFindBestMatch_generic(ms, ip, iLimit, offsetPtr, 5, ZSTD_extDict); in ZSTD_HcFindBestMatch_extDict_selectMLS()
614 case 6 : return ZSTD_HcFindBestMatch_generic(ms, ip, iLimit, offsetPtr, 6, ZSTD_extDict); in ZSTD_HcFindBestMatch_extDict_selectMLS()
626 ZSTD_matchState_t* ms, seqStore_t* seqStore, in ZSTD_compressBlock_lazy_generic() argument
637 const BYTE* const base = ms->window.base; in ZSTD_compressBlock_lazy_generic()
638 const U32 prefixLowestIndex = ms->window.dictLimit; in ZSTD_compressBlock_lazy_generic()
642 ZSTD_matchState_t* ms, in ZSTD_compressBlock_lazy_generic()
649 U32 offset_1 = rep[0], offset_2 = rep[1], savedOffset=0; in ZSTD_compressBlock_lazy_generic()
651 const ZSTD_matchState_t* const dms = ms->dictMatchState; in ZSTD_compressBlock_lazy_generic()
671 U32 const windowLow = ZSTD_getLowestPrefixIndex(ms, current, ms->cParams.windowLog); in ZSTD_compressBlock_lazy_generic()
693 const BYTE* start=ip+1; in ZSTD_compressBlock_lazy_generic()
697 const U32 repIndex = (U32)(ip - base) + 1 - offset_1; in ZSTD_compressBlock_lazy_generic()
702 if (((U32)((prefixLowestIndex-1) - repIndex) >= 3 /* intentional underflow */) in ZSTD_compressBlock_lazy_generic()
703 && (MEM_read32(repMatch) == MEM_read32(ip+1)) ) { in ZSTD_compressBlock_lazy_generic()
705 … matchLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repMatchEnd, prefixLowest) + 4; in ZSTD_compressBlock_lazy_generic()
710 && ((offset_1 > 0) & (MEM_read32(ip+1-offset_1) == MEM_read32(ip+1)))) { in ZSTD_compressBlock_lazy_generic()
711 matchLength = ZSTD_count(ip+1+4, ip+1+4-offset_1, iend) + 4; in ZSTD_compressBlock_lazy_generic()
717 size_t const ml2 = searchMax(ms, ip, iend, &offsetFound); in ZSTD_compressBlock_lazy_generic()
723 … ip += ((ip-anchor) >> kSearchStrength) + 1; /* jump faster over incompressible sections */ in ZSTD_compressBlock_lazy_generic()
728 if (depth>=1) in ZSTD_compressBlock_lazy_generic()
735 int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)offset+1) + 1); in ZSTD_compressBlock_lazy_generic()
744 if (((U32)((prefixLowestIndex-1) - repIndex) >= 3 /* intentional underflow */) in ZSTD_compressBlock_lazy_generic()
749 int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)offset+1) + 1); in ZSTD_compressBlock_lazy_generic()
755 size_t const ml2 = searchMax(ms, ip, iend, &offset2); in ZSTD_compressBlock_lazy_generic()
756 int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)offset2+1)); /* raw approx */ in ZSTD_compressBlock_lazy_generic()
757 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 4); in ZSTD_compressBlock_lazy_generic()
770 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 1); in ZSTD_compressBlock_lazy_generic()
779 if (((U32)((prefixLowestIndex-1) - repIndex) >= 3 /* intentional underflow */) in ZSTD_compressBlock_lazy_generic()
784 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 1); in ZSTD_compressBlock_lazy_generic()
790 size_t const ml2 = searchMax(ms, ip, iend, &offset2); in ZSTD_compressBlock_lazy_generic()
791 … int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)offset2+1)); /* raw approx */ in ZSTD_compressBlock_lazy_generic()
792 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 7); in ZSTD_compressBlock_lazy_generic()
801 * start[-offset+ZSTD_REP_MOVE-1] is undefined behavior. in ZSTD_compressBlock_lazy_generic()
802 * (-offset+ZSTD_REP_MOVE-1) is unsigned, and is added to start, which in ZSTD_compressBlock_lazy_generic()
809 … && (start[-1] == (start-(offset-ZSTD_REP_MOVE))[-1]) ) /* only search for offset within prefix */ in ZSTD_compressBlock_lazy_generic()
816 …while ((start>anchor) && (match>mStart) && (start[-1] == match[-1])) { start--; match--; matchLeng… in ZSTD_compressBlock_lazy_generic()
836 if ( ((U32)((prefixLowestIndex-1) - (U32)repIndex) >= 3 /* intentional overflow */) in ZSTD_compressBlock_lazy_generic()
864 rep[1] = offset_2 ? offset_2 : savedOffset; in ZSTD_compressBlock_lazy_generic()
872 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_btlazy2() argument
875 …return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_binaryTree, 2, ZSTD… in ZSTD_compressBlock_btlazy2()
879 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_lazy2() argument
882 …return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 2, ZSTD_… in ZSTD_compressBlock_lazy2()
886 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_lazy() argument
889 …return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 1, ZSTD_… in ZSTD_compressBlock_lazy()
893 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_greedy() argument
896 …return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 0, ZSTD_… in ZSTD_compressBlock_greedy()
900 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_btlazy2_dictMatchState() argument
903 …return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_binaryTree, 2, ZSTD… in ZSTD_compressBlock_btlazy2_dictMatchState()
907 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_lazy2_dictMatchState() argument
910 …return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 2, ZSTD_… in ZSTD_compressBlock_lazy2_dictMatchState()
914 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_lazy_dictMatchState() argument
917 …return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 1, ZSTD_… in ZSTD_compressBlock_lazy_dictMatchState()
921 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_greedy_dictMatchState() argument
924 …return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 0, ZSTD_… in ZSTD_compressBlock_greedy_dictMatchState()
930 ZSTD_matchState_t* ms, seqStore_t* seqStore, in ZSTD_compressBlock_lazy_extDict_generic() argument
940 const BYTE* const base = ms->window.base; in ZSTD_compressBlock_lazy_extDict_generic()
941 const U32 dictLimit = ms->window.dictLimit; in ZSTD_compressBlock_lazy_extDict_generic()
943 const BYTE* const dictBase = ms->window.dictBase; in ZSTD_compressBlock_lazy_extDict_generic()
945 const BYTE* const dictStart = dictBase + ms->window.lowLimit; in ZSTD_compressBlock_lazy_extDict_generic()
946 const U32 windowLog = ms->cParams.windowLog; in ZSTD_compressBlock_lazy_extDict_generic()
949 ZSTD_matchState_t* ms, in ZSTD_compressBlock_lazy_extDict_generic()
953 U32 offset_1 = rep[0], offset_2 = rep[1]; in ZSTD_compressBlock_lazy_extDict_generic()
970 const BYTE* start=ip+1; in ZSTD_compressBlock_lazy_extDict_generic()
974 { const U32 windowLow = ZSTD_getLowestMatchIndex(ms, current+1, windowLog); in ZSTD_compressBlock_lazy_extDict_generic()
975 const U32 repIndex = (U32)(current+1 - offset_1); in ZSTD_compressBlock_lazy_extDict_generic()
978 if ( ((U32)((dictLimit-1) - repIndex) >= 3) /* intentional overflow */ in ZSTD_compressBlock_lazy_extDict_generic()
979 & (offset_1 < current+1 - windowLow) ) /* note: we are searching at current+1 */ in ZSTD_compressBlock_lazy_extDict_generic()
980 if (MEM_read32(ip+1) == MEM_read32(repMatch)) { in ZSTD_compressBlock_lazy_extDict_generic()
983 … matchLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repEnd, prefixStart) + 4; in ZSTD_compressBlock_lazy_extDict_generic()
989 size_t const ml2 = searchMax(ms, ip, iend, &offsetFound); in ZSTD_compressBlock_lazy_extDict_generic()
995 … ip += ((ip-anchor) >> kSearchStrength) + 1; /* jump faster over incompressible sections */ in ZSTD_compressBlock_lazy_extDict_generic()
1000 if (depth>=1) in ZSTD_compressBlock_lazy_extDict_generic()
1006 const U32 windowLow = ZSTD_getLowestMatchIndex(ms, current, windowLog); in ZSTD_compressBlock_lazy_extDict_generic()
1010 …if ( ((U32)((dictLimit-1) - repIndex) >= 3) /* intentional overflow : do not test positions overla… in ZSTD_compressBlock_lazy_extDict_generic()
1017 int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)offset+1) + 1); in ZSTD_compressBlock_lazy_extDict_generic()
1022 /* search match, depth 1 */ in ZSTD_compressBlock_lazy_extDict_generic()
1024 size_t const ml2 = searchMax(ms, ip, iend, &offset2); in ZSTD_compressBlock_lazy_extDict_generic()
1025 int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)offset2+1)); /* raw approx */ in ZSTD_compressBlock_lazy_extDict_generic()
1026 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 4); in ZSTD_compressBlock_lazy_extDict_generic()
1038 const U32 windowLow = ZSTD_getLowestMatchIndex(ms, current, windowLog); in ZSTD_compressBlock_lazy_extDict_generic()
1042 …if ( ((U32)((dictLimit-1) - repIndex) >= 3) /* intentional overflow : do not test positions overla… in ZSTD_compressBlock_lazy_extDict_generic()
1049 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 1); in ZSTD_compressBlock_lazy_extDict_generic()
1056 size_t const ml2 = searchMax(ms, ip, iend, &offset2); in ZSTD_compressBlock_lazy_extDict_generic()
1057 … int const gain2 = (int)(ml2*4 - ZSTD_highbit32((U32)offset2+1)); /* raw approx */ in ZSTD_compressBlock_lazy_extDict_generic()
1058 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 7); in ZSTD_compressBlock_lazy_extDict_generic()
1071 …while ((start>anchor) && (match>mStart) && (start[-1] == match[-1])) { start--; match--; matchLeng… in ZSTD_compressBlock_lazy_extDict_generic()
1085 const U32 windowLow = ZSTD_getLowestMatchIndex(ms, repCurrent, windowLog); in ZSTD_compressBlock_lazy_extDict_generic()
1089 …if ( ((U32)((dictLimit-1) - repIndex) >= 3) /* intentional overflow : do not test positions overla… in ZSTD_compressBlock_lazy_extDict_generic()
1106 rep[1] = offset_2; in ZSTD_compressBlock_lazy_extDict_generic()
1114 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_greedy_extDict() argument
1117 …return ZSTD_compressBlock_lazy_extDict_generic(ms, seqStore, rep, src, srcSize, search_hashChain, … in ZSTD_compressBlock_greedy_extDict()
1121 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_lazy_extDict() argument
1125 …return ZSTD_compressBlock_lazy_extDict_generic(ms, seqStore, rep, src, srcSize, search_hashChain, … in ZSTD_compressBlock_lazy_extDict()
1129 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_lazy2_extDict() argument
1133 …return ZSTD_compressBlock_lazy_extDict_generic(ms, seqStore, rep, src, srcSize, search_hashChain, … in ZSTD_compressBlock_lazy2_extDict()
1137 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], in ZSTD_compressBlock_btlazy2_extDict() argument
1141 …return ZSTD_compressBlock_lazy_extDict_generic(ms, seqStore, rep, src, srcSize, search_binaryTree,… in ZSTD_compressBlock_btlazy2_extDict()