Lines Matching refs:matchIndex

45         U32    const matchIndex = hashTable[h];  in ZSTD_updateDUBT()  local
52 *nextCandidatePtr = matchIndex; /* update BT like a chain */ in ZSTD_updateDUBT()
84 …U32 matchIndex = *smallerPtr; /* this candidate is unsorted : next sorted candidate is reached t… in ZSTD_insertDUBT1() local
96 for (; nbCompares && (matchIndex > windowLow); --nbCompares) { in ZSTD_insertDUBT1()
97 U32* const nextPtr = bt + 2*(matchIndex & btMask); in ZSTD_insertDUBT1()
99 assert(matchIndex < curr); in ZSTD_insertDUBT1()
105 || (matchIndex+matchLength >= dictLimit) /* both in current segment*/ in ZSTD_insertDUBT1()
108 || (matchIndex+matchLength >= dictLimit)) ? in ZSTD_insertDUBT1()
110 …assert( (matchIndex+matchLength >= dictLimit) /* might be wrong if extDict is incorrectly set to… in ZSTD_insertDUBT1()
112 match = mBase + matchIndex; in ZSTD_insertDUBT1()
115 match = dictBase + matchIndex; in ZSTD_insertDUBT1()
117 if (matchIndex+matchLength >= dictLimit) in ZSTD_insertDUBT1()
118 match = base + matchIndex; /* preparation for next read of match[matchLength] */ in ZSTD_insertDUBT1()
122 curr, matchIndex, (U32)matchLength); in ZSTD_insertDUBT1()
130 *smallerPtr = matchIndex; /* update smaller idx */ in ZSTD_insertDUBT1()
132 … if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop searching */ in ZSTD_insertDUBT1()
134 matchIndex, btLow, nextPtr[1]); in ZSTD_insertDUBT1()
136matchIndex = nextPtr[1]; /* new matchIndex, larger than previous and closer to curren… in ZSTD_insertDUBT1()
139 *largerPtr = matchIndex; in ZSTD_insertDUBT1()
141 … if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop searching */ in ZSTD_insertDUBT1()
143 matchIndex, btLow, nextPtr[0]); in ZSTD_insertDUBT1()
145 matchIndex = nextPtr[0]; in ZSTD_insertDUBT1()
197 U32 matchIndex = dictMatchIndex + dictIndexDelta; in ZSTD_DUBT_findBetterDictMatch() local
198 …if ( (4*(int)(matchLength-bestLength)) > (int)(ZSTD_highbit32(curr-matchIndex+1) - ZSTD_highbit32(… in ZSTD_DUBT_findBetterDictMatch()
200 … (U32)matchLength, (U32)*offsetPtr, ZSTD_REP_MOVE + curr - matchIndex, dictMatchIndex, matchIndex); in ZSTD_DUBT_findBetterDictMatch()
201 bestLength = matchLength, *offsetPtr = ZSTD_REP_MOVE + curr - matchIndex; in ZSTD_DUBT_findBetterDictMatch()
241 U32 matchIndex = hashTable[h]; in ZSTD_DUBT_findBestMatch() local
253 U32* nextCandidate = bt + 2*(matchIndex&btMask); in ZSTD_DUBT_findBestMatch()
254 U32* unsortedMark = bt + 2*(matchIndex&btMask) + 1; in ZSTD_DUBT_findBestMatch()
264 while ( (matchIndex > unsortLimit) in ZSTD_DUBT_findBestMatch()
268 matchIndex); in ZSTD_DUBT_findBestMatch()
270 previousCandidate = matchIndex; in ZSTD_DUBT_findBestMatch()
271 matchIndex = *nextCandidate; in ZSTD_DUBT_findBestMatch()
272 nextCandidate = bt + 2*(matchIndex&btMask); in ZSTD_DUBT_findBestMatch()
273 unsortedMark = bt + 2*(matchIndex&btMask) + 1; in ZSTD_DUBT_findBestMatch()
279 if ( (matchIndex > unsortLimit) in ZSTD_DUBT_findBestMatch()
282 matchIndex); in ZSTD_DUBT_findBestMatch()
287 matchIndex = previousCandidate; in ZSTD_DUBT_findBestMatch()
288 while (matchIndex) { /* will end on matchIndex == 0 */ in ZSTD_DUBT_findBestMatch()
289 U32* const nextCandidateIdxPtr = bt + 2*(matchIndex&btMask) + 1; in ZSTD_DUBT_findBestMatch()
291 ZSTD_insertDUBT1(ms, matchIndex, iend, in ZSTD_DUBT_findBestMatch()
293 matchIndex = nextCandidateIdx; in ZSTD_DUBT_findBestMatch()
309 matchIndex = hashTable[h]; in ZSTD_DUBT_findBestMatch()
312 for (; nbCompares && (matchIndex > windowLow); --nbCompares) { in ZSTD_DUBT_findBestMatch()
313 U32* const nextPtr = bt + 2*(matchIndex & btMask); in ZSTD_DUBT_findBestMatch()
317 if ((dictMode != ZSTD_extDict) || (matchIndex+matchLength >= dictLimit)) { in ZSTD_DUBT_findBestMatch()
318 match = base + matchIndex; in ZSTD_DUBT_findBestMatch()
321 match = dictBase + matchIndex; in ZSTD_DUBT_findBestMatch()
323 if (matchIndex+matchLength >= dictLimit) in ZSTD_DUBT_findBestMatch()
324 … match = base + matchIndex; /* to prepare for next usage of match[matchLength] */ in ZSTD_DUBT_findBestMatch()
328 if (matchLength > matchEndIdx - matchIndex) in ZSTD_DUBT_findBestMatch()
329 matchEndIdx = matchIndex + (U32)matchLength; in ZSTD_DUBT_findBestMatch()
330 …if ( (4*(int)(matchLength-bestLength)) > (int)(ZSTD_highbit32(curr-matchIndex+1) - ZSTD_highbit32(… in ZSTD_DUBT_findBestMatch()
331 bestLength = matchLength, *offsetPtr = ZSTD_REP_MOVE + curr - matchIndex; in ZSTD_DUBT_findBestMatch()
344 *smallerPtr = matchIndex; /* update smaller idx */ in ZSTD_DUBT_findBestMatch()
346 … if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop the search */ in ZSTD_DUBT_findBestMatch()
348matchIndex = nextPtr[1]; /* new matchIndex larger than previous (closer to current) */ in ZSTD_DUBT_findBestMatch()
351 *largerPtr = matchIndex; in ZSTD_DUBT_findBestMatch()
353 … if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop the search */ in ZSTD_DUBT_findBestMatch()
355 matchIndex = nextPtr[0]; in ZSTD_DUBT_findBestMatch()
629 U32 matchIndex; in ZSTD_HcFindBestMatch_generic() local
637 matchIndex = ZSTD_insertAndFindFirstIndex_internal(ms, cParams, ip, mls); in ZSTD_HcFindBestMatch_generic()
639 for ( ; (matchIndex>=lowLimit) & (nbAttempts>0) ; nbAttempts--) { in ZSTD_HcFindBestMatch_generic()
641 if ((dictMode != ZSTD_extDict) || matchIndex >= dictLimit) { in ZSTD_HcFindBestMatch_generic()
642 const BYTE* const match = base + matchIndex; in ZSTD_HcFindBestMatch_generic()
643 … assert(matchIndex >= dictLimit); /* ensures this is true if dictMode != ZSTD_extDict */ in ZSTD_HcFindBestMatch_generic()
647 const BYTE* const match = dictBase + matchIndex; in ZSTD_HcFindBestMatch_generic()
656 *offsetPtr = curr - matchIndex + ZSTD_REP_MOVE; in ZSTD_HcFindBestMatch_generic()
660 if (matchIndex <= minChain) break; in ZSTD_HcFindBestMatch_generic()
661 matchIndex = NEXT_IN_CHAIN(matchIndex, chainMask); in ZSTD_HcFindBestMatch_generic()
689 matchIndex = dms->hashTable[ddsIdx + ddsAttempt]; in ZSTD_HcFindBestMatch_generic()
690 match = ddsBase + matchIndex; in ZSTD_HcFindBestMatch_generic()
692 if (!matchIndex) { in ZSTD_HcFindBestMatch_generic()
698 assert(matchIndex >= ddsLowestIndex); in ZSTD_HcFindBestMatch_generic()
708 *offsetPtr = curr - (matchIndex + ddsIndexDelta) + ZSTD_REP_MOVE; in ZSTD_HcFindBestMatch_generic()
731 matchIndex = dms->chainTable[chainIndex]; in ZSTD_HcFindBestMatch_generic()
732 match = ddsBase + matchIndex; in ZSTD_HcFindBestMatch_generic()
735 assert(matchIndex >= ddsLowestIndex); in ZSTD_HcFindBestMatch_generic()
745 *offsetPtr = curr - (matchIndex + ddsIndexDelta) + ZSTD_REP_MOVE; in ZSTD_HcFindBestMatch_generic()
761 matchIndex = dms->hashTable[ZSTD_hashPtr(ip, dms->cParams.hashLog, mls)]; in ZSTD_HcFindBestMatch_generic()
763 for ( ; (matchIndex>=dmsLowestIndex) & (nbAttempts>0) ; nbAttempts--) { in ZSTD_HcFindBestMatch_generic()
765 const BYTE* const match = dmsBase + matchIndex; in ZSTD_HcFindBestMatch_generic()
773 *offsetPtr = curr - (matchIndex + dmsIndexDelta) + ZSTD_REP_MOVE; in ZSTD_HcFindBestMatch_generic()
777 if (matchIndex <= dmsMinChain) break; in ZSTD_HcFindBestMatch_generic()
779 matchIndex = dmsChainTable[matchIndex & dmsChainMask]; in ZSTD_HcFindBestMatch_generic()
1068 U32 const matchIndex = (U32)((start-base) - (offset - ZSTD_REP_MOVE)); in ZSTD_compressBlock_lazy_generic() local
1069 …const BYTE* match = (matchIndex < prefixLowestIndex) ? dictBase + matchIndex - dictIndexDelta : ba… in ZSTD_compressBlock_lazy_generic()
1070 … const BYTE* const mStart = (matchIndex < prefixLowestIndex) ? dictLowest : prefixLowest; in ZSTD_compressBlock_lazy_generic()
1341 U32 const matchIndex = (U32)((start-base) - (offset - ZSTD_REP_MOVE)); in ZSTD_compressBlock_lazy_extDict_generic() local
1342 … const BYTE* match = (matchIndex < dictLimit) ? dictBase + matchIndex : base + matchIndex; in ZSTD_compressBlock_lazy_extDict_generic()
1343 const BYTE* const mStart = (matchIndex < dictLimit) ? dictStart : prefixStart; in ZSTD_compressBlock_lazy_extDict_generic()