Lines Matching refs:matchIndex
424 U32 matchIndex = hashTable[h];
458 for (; nbCompares && (matchIndex >= windowLow); --nbCompares) {
459 U32* const nextPtr = bt + 2*(matchIndex & btMask);
461 assert(matchIndex < curr);
464 const U32* predictPtr = bt + 2*((matchIndex-1) & btMask); /* written this way, as bt is a roll buffer */
465 if (matchIndex == predictedSmall) {
467 *smallerPtr = matchIndex;
468 if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop the search */
470 matchIndex = nextPtr[1]; /* new matchIndex larger than previous (closer to current) */
474 if (matchIndex == predictedLarge) {
475 *largerPtr = matchIndex;
476 if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop the search */
478 matchIndex = nextPtr[0];
484 if (!extDict || (matchIndex+matchLength >= dictLimit)) {
485 assert(matchIndex+matchLength >= dictLimit); /* might be wrong if actually extDict */
486 match = base + matchIndex;
489 match = dictBase + matchIndex;
491 if (matchIndex+matchLength >= dictLimit)
492 match = base + matchIndex; /* to prepare for next usage of match[matchLength] */
497 if (matchLength > matchEndIdx - matchIndex)
498 matchEndIdx = matchIndex + (U32)matchLength;
507 *smallerPtr = matchIndex; /* update smaller idx */
509 if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop searching */
511 matchIndex = nextPtr[1]; /* new matchIndex, larger than previous and closer to current */
514 *largerPtr = matchIndex;
516 if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop searching */
518 matchIndex = nextPtr[0];
574 U32 matchIndex = hashTable[h];
689 for (; nbCompares && (matchIndex >= matchLow); --nbCompares) {
690 U32* const nextPtr = bt + 2*(matchIndex & btMask);
693 assert(curr > matchIndex);
695 if ((dictMode == ZSTD_noDict) || (dictMode == ZSTD_dictMatchState) || (matchIndex+matchLength >= dictLimit)) {
696 assert(matchIndex+matchLength >= dictLimit); /* ensure the condition is correct when !extDict */
697 match = base + matchIndex;
698 if (matchIndex >= dictLimit) assert(memcmp(match, ip, matchLength) == 0); /* ensure early section of match is equal as expected */
701 match = dictBase + matchIndex;
704 if (matchIndex+matchLength >= dictLimit)
705 match = base + matchIndex; /* prepare for match[matchLength] read */
710 (U32)matchLength, curr - matchIndex, STORE_OFFSET(curr - matchIndex));
711 assert(matchEndIdx > matchIndex);
712 if (matchLength > matchEndIdx - matchIndex)
713 matchEndIdx = matchIndex + (U32)matchLength;
715 matches[mnum].off = STORE_OFFSET(curr - matchIndex);
726 *smallerPtr = matchIndex; /* update smaller idx */
728 if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop the search */
730 matchIndex = nextPtr[1]; /* new matchIndex, larger than previous, closer to current */
732 *largerPtr = matchIndex;
734 if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop the search */
736 matchIndex = nextPtr[0];
756 matchIndex = dictMatchIndex + dmsIndexDelta;
758 (U32)matchLength, curr - matchIndex, STORE_OFFSET(curr - matchIndex));
759 if (matchLength > matchEndIdx - matchIndex)
760 matchEndIdx = matchIndex + (U32)matchLength;
762 matches[mnum].off = STORE_OFFSET(curr - matchIndex);
773 dictMatchIndex = nextPtr[1]; /* new matchIndex larger than previous (closer to current) */