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 …h, (U32)matchLength, (U32)*offsetPtr, STORE_OFFSET(curr - matchIndex), dictMatchIndex, matchIndex); in ZSTD_DUBT_findBetterDictMatch()
201 bestLength = matchLength, *offsetPtr = STORE_OFFSET(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 = STORE_OFFSET(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()
529 U32 matchIndex; in ZSTD_dedicatedDictSearch_lazy_search() local
545 matchIndex = dms->hashTable[ddsIdx + ddsAttempt]; in ZSTD_dedicatedDictSearch_lazy_search()
546 match = ddsBase + matchIndex; in ZSTD_dedicatedDictSearch_lazy_search()
548 if (!matchIndex) { in ZSTD_dedicatedDictSearch_lazy_search()
554 assert(matchIndex >= ddsLowestIndex); in ZSTD_dedicatedDictSearch_lazy_search()
564 *offsetPtr = STORE_OFFSET(curr - (matchIndex + ddsIndexDelta)); in ZSTD_dedicatedDictSearch_lazy_search()
587 matchIndex = dms->chainTable[chainIndex]; in ZSTD_dedicatedDictSearch_lazy_search()
588 match = ddsBase + matchIndex; in ZSTD_dedicatedDictSearch_lazy_search()
591 assert(matchIndex >= ddsLowestIndex); in ZSTD_dedicatedDictSearch_lazy_search()
601 *offsetPtr = STORE_OFFSET(curr - (matchIndex + ddsIndexDelta)); in ZSTD_dedicatedDictSearch_lazy_search()
679 U32 matchIndex; in ZSTD_HcFindBestMatch() local
687 matchIndex = ZSTD_insertAndFindFirstIndex_internal(ms, cParams, ip, mls); in ZSTD_HcFindBestMatch()
689 for ( ; (matchIndex>=lowLimit) & (nbAttempts>0) ; nbAttempts--) { in ZSTD_HcFindBestMatch()
691 if ((dictMode != ZSTD_extDict) || matchIndex >= dictLimit) { in ZSTD_HcFindBestMatch()
692 const BYTE* const match = base + matchIndex; in ZSTD_HcFindBestMatch()
693 … assert(matchIndex >= dictLimit); /* ensures this is true if dictMode != ZSTD_extDict */ in ZSTD_HcFindBestMatch()
697 const BYTE* const match = dictBase + matchIndex; in ZSTD_HcFindBestMatch()
706 *offsetPtr = STORE_OFFSET(curr - matchIndex); in ZSTD_HcFindBestMatch()
710 if (matchIndex <= minChain) break; in ZSTD_HcFindBestMatch()
711 matchIndex = NEXT_IN_CHAIN(matchIndex, chainMask); in ZSTD_HcFindBestMatch()
729 matchIndex = dms->hashTable[ZSTD_hashPtr(ip, dms->cParams.hashLog, mls)]; in ZSTD_HcFindBestMatch()
731 for ( ; (matchIndex>=dmsLowestIndex) & (nbAttempts>0) ; nbAttempts--) { in ZSTD_HcFindBestMatch()
733 const BYTE* const match = dmsBase + matchIndex; in ZSTD_HcFindBestMatch()
741 assert(curr > matchIndex + dmsIndexDelta); in ZSTD_HcFindBestMatch()
742 *offsetPtr = STORE_OFFSET(curr - (matchIndex + dmsIndexDelta)); in ZSTD_HcFindBestMatch()
746 if (matchIndex <= dmsMinChain) break; in ZSTD_HcFindBestMatch()
748 matchIndex = dmsChainTable[matchIndex & dmsChainMask]; in ZSTD_HcFindBestMatch()
1197 U32 const matchIndex = row[matchPos]; in ZSTD_RowFindBestMatch() local
1199 if (matchIndex < lowLimit) in ZSTD_RowFindBestMatch()
1201 if ((dictMode != ZSTD_extDict) || matchIndex >= dictLimit) { in ZSTD_RowFindBestMatch()
1202 PREFETCH_L1(base + matchIndex); in ZSTD_RowFindBestMatch()
1204 PREFETCH_L1(dictBase + matchIndex); in ZSTD_RowFindBestMatch()
1206 matchBuffer[numMatches++] = matchIndex; in ZSTD_RowFindBestMatch()
1219 U32 const matchIndex = matchBuffer[currMatch]; in ZSTD_RowFindBestMatch() local
1221 assert(matchIndex < curr); in ZSTD_RowFindBestMatch()
1222 assert(matchIndex >= lowLimit); in ZSTD_RowFindBestMatch()
1224 if ((dictMode != ZSTD_extDict) || matchIndex >= dictLimit) { in ZSTD_RowFindBestMatch()
1225 const BYTE* const match = base + matchIndex; in ZSTD_RowFindBestMatch()
1226 … assert(matchIndex >= dictLimit); /* ensures this is true if dictMode != ZSTD_extDict */ in ZSTD_RowFindBestMatch()
1230 const BYTE* const match = dictBase + matchIndex; in ZSTD_RowFindBestMatch()
1239 *offsetPtr = STORE_OFFSET(curr - matchIndex); in ZSTD_RowFindBestMatch()
1265 U32 const matchIndex = dmsRow[matchPos]; in ZSTD_RowFindBestMatch() local
1266 if (matchIndex < dmsLowestIndex) in ZSTD_RowFindBestMatch()
1268 PREFETCH_L1(dmsBase + matchIndex); in ZSTD_RowFindBestMatch()
1269 matchBuffer[numMatches++] = matchIndex; in ZSTD_RowFindBestMatch()
1274 U32 const matchIndex = matchBuffer[currMatch]; in ZSTD_RowFindBestMatch() local
1276 assert(matchIndex >= dmsLowestIndex); in ZSTD_RowFindBestMatch()
1277 assert(matchIndex < curr); in ZSTD_RowFindBestMatch()
1279 { const BYTE* const match = dmsBase + matchIndex; in ZSTD_RowFindBestMatch()
1287 assert(curr > matchIndex + dmsIndexDelta); in ZSTD_RowFindBestMatch()
1288 *offsetPtr = STORE_OFFSET(curr - (matchIndex + dmsIndexDelta)); in ZSTD_RowFindBestMatch()
1663 U32 const matchIndex = (U32)((size_t)(start-base) - STORED_OFFSET(offcode)); in ZSTD_compressBlock_lazy_generic() local
1664 …const BYTE* match = (matchIndex < prefixLowestIndex) ? dictBase + matchIndex - dictIndexDelta : ba… in ZSTD_compressBlock_lazy_generic()
1665 … const BYTE* const mStart = (matchIndex < prefixLowestIndex) ? dictLowest : prefixLowest; in ZSTD_compressBlock_lazy_generic()
2005 U32 const matchIndex = (U32)((size_t)(start-base) - STORED_OFFSET(offcode)); in ZSTD_compressBlock_lazy_extDict_generic() local
2006 … const BYTE* match = (matchIndex < dictLimit) ? dictBase + matchIndex : base + matchIndex; in ZSTD_compressBlock_lazy_extDict_generic()
2007 const BYTE* const mStart = (matchIndex < dictLimit) ? dictStart : prefixStart; in ZSTD_compressBlock_lazy_extDict_generic()