• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/sys/contrib/zstd/lib/compress/

Lines Matching defs:matchIndex

282     U32 matchIndex = hashTable[h];
311 while (nbCompares-- && (matchIndex > windowLow)) {
312 U32* const nextPtr = bt + 2*(matchIndex & btMask);
314 assert(matchIndex < current);
317 const U32* predictPtr = bt + 2*((matchIndex-1) & btMask); /* written this way, as bt is a roll buffer */
318 if (matchIndex == predictedSmall) {
320 *smallerPtr = matchIndex;
321 if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop the search */
323 matchIndex = nextPtr[1]; /* new matchIndex larger than previous (closer to current) */
327 if (matchIndex == predictedLarge) {
328 *largerPtr = matchIndex;
329 if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop the search */
331 matchIndex = nextPtr[0];
337 if ((!extDict) || (matchIndex+matchLength >= dictLimit)) {
338 assert(matchIndex+matchLength >= dictLimit); /* might be wrong if extDict is incorrectly set to 0 */
339 match = base + matchIndex;
342 match = dictBase + matchIndex;
344 if (matchIndex+matchLength >= dictLimit)
345 match = base + matchIndex; /* to prepare for next usage of match[matchLength] */
350 if (matchLength > matchEndIdx - matchIndex)
351 matchEndIdx = matchIndex + (U32)matchLength;
360 *smallerPtr = matchIndex; /* update smaller idx */
362 if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop searching */
364 matchIndex = nextPtr[1]; /* new matchIndex, larger than previous and closer to current */
367 *largerPtr = matchIndex;
369 if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop searching */
371 matchIndex = nextPtr[0];
418 U32 matchIndex = hashTable[h];
505 while (nbCompares-- && (matchIndex > windowLow)) {
506 U32* const nextPtr = bt + 2*(matchIndex & btMask);
509 assert(current > matchIndex);
511 if ((!extDict) || (matchIndex+matchLength >= dictLimit)) {
512 assert(matchIndex+matchLength >= dictLimit); /* ensure the condition is correct when !extDict */
513 match = base + matchIndex;
516 match = dictBase + matchIndex;
518 if (matchIndex+matchLength >= dictLimit)
519 match = base + matchIndex; /* prepare for match[matchLength] */
524 (U32)matchLength, current - matchIndex);
525 assert(matchEndIdx > matchIndex);
526 if (matchLength > matchEndIdx - matchIndex)
527 matchEndIdx = matchIndex + (U32)matchLength;
529 matches[mnum].off = (current - matchIndex) + ZSTD_REP_MOVE;
540 *smallerPtr = matchIndex; /* update smaller idx */
542 if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop the search */
544 matchIndex = nextPtr[1]; /* new matchIndex, larger than previous, closer to current */
546 *largerPtr = matchIndex;
548 if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop the search */
550 matchIndex = nextPtr[0];