Lines Matching refs:matchIndex

456     U32 matchIndex = hashTable[h];  in ZSTD_insertBt1()  local
490 for (; nbCompares && (matchIndex >= windowLow); --nbCompares) { in ZSTD_insertBt1()
491 U32* const nextPtr = bt + 2*(matchIndex & btMask); in ZSTD_insertBt1()
493 assert(matchIndex < curr); in ZSTD_insertBt1()
496 …const U32* predictPtr = bt + 2*((matchIndex-1) & btMask); /* written this way, as bt is a roll b… in ZSTD_insertBt1()
497 if (matchIndex == predictedSmall) { in ZSTD_insertBt1()
499 *smallerPtr = matchIndex; in ZSTD_insertBt1()
500 … if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop the search */ in ZSTD_insertBt1()
502matchIndex = nextPtr[1]; /* new matchIndex larger than previous (closer to current) */ in ZSTD_insertBt1()
506 if (matchIndex == predictedLarge) { in ZSTD_insertBt1()
507 *largerPtr = matchIndex; in ZSTD_insertBt1()
508 … if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop the search */ in ZSTD_insertBt1()
510 matchIndex = nextPtr[0]; in ZSTD_insertBt1()
516 if (!extDict || (matchIndex+matchLength >= dictLimit)) { in ZSTD_insertBt1()
517 assert(matchIndex+matchLength >= dictLimit); /* might be wrong if actually extDict */ in ZSTD_insertBt1()
518 match = base + matchIndex; in ZSTD_insertBt1()
521 match = dictBase + matchIndex; in ZSTD_insertBt1()
523 if (matchIndex+matchLength >= dictLimit) in ZSTD_insertBt1()
524 match = base + matchIndex; /* to prepare for next usage of match[matchLength] */ in ZSTD_insertBt1()
529 if (matchLength > matchEndIdx - matchIndex) in ZSTD_insertBt1()
530 matchEndIdx = matchIndex + (U32)matchLength; in ZSTD_insertBt1()
539 *smallerPtr = matchIndex; /* update smaller idx */ in ZSTD_insertBt1()
541 … if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop searching */ in ZSTD_insertBt1()
543matchIndex = nextPtr[1]; /* new matchIndex, larger than previous and closer to curren… in ZSTD_insertBt1()
546 *largerPtr = matchIndex; in ZSTD_insertBt1()
548 … if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop searching */ in ZSTD_insertBt1()
550 matchIndex = nextPtr[0]; in ZSTD_insertBt1()
610 U32 matchIndex = hashTable[h]; in ZSTD_insertBtAndGetAllMatches() local
725 for (; nbCompares && (matchIndex >= matchLow); --nbCompares) { in ZSTD_insertBtAndGetAllMatches()
726 U32* const nextPtr = bt + 2*(matchIndex & btMask); in ZSTD_insertBtAndGetAllMatches()
729 assert(curr > matchIndex); in ZSTD_insertBtAndGetAllMatches()
731 …if ((dictMode == ZSTD_noDict) || (dictMode == ZSTD_dictMatchState) || (matchIndex+matchLength >= d… in ZSTD_insertBtAndGetAllMatches()
732 … assert(matchIndex+matchLength >= dictLimit); /* ensure the condition is correct when !extDict */ in ZSTD_insertBtAndGetAllMatches()
733 match = base + matchIndex; in ZSTD_insertBtAndGetAllMatches()
734 …if (matchIndex >= dictLimit) assert(memcmp(match, ip, matchLength) == 0); /* ensure early section… in ZSTD_insertBtAndGetAllMatches()
737 match = dictBase + matchIndex; in ZSTD_insertBtAndGetAllMatches()
740 if (matchIndex+matchLength >= dictLimit) in ZSTD_insertBtAndGetAllMatches()
741 match = base + matchIndex; /* prepare for match[matchLength] read */ in ZSTD_insertBtAndGetAllMatches()
746 (U32)matchLength, curr - matchIndex, OFFSET_TO_OFFBASE(curr - matchIndex)); in ZSTD_insertBtAndGetAllMatches()
747 assert(matchEndIdx > matchIndex); in ZSTD_insertBtAndGetAllMatches()
748 if (matchLength > matchEndIdx - matchIndex) in ZSTD_insertBtAndGetAllMatches()
749 matchEndIdx = matchIndex + (U32)matchLength; in ZSTD_insertBtAndGetAllMatches()
751 matches[mnum].off = OFFSET_TO_OFFBASE(curr - matchIndex); in ZSTD_insertBtAndGetAllMatches()
762 *smallerPtr = matchIndex; /* update smaller idx */ in ZSTD_insertBtAndGetAllMatches()
764 … if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop the search */ in ZSTD_insertBtAndGetAllMatches()
766matchIndex = nextPtr[1]; /* new matchIndex, larger than previous, closer to current */ in ZSTD_insertBtAndGetAllMatches()
768 *largerPtr = matchIndex; in ZSTD_insertBtAndGetAllMatches()
770 … if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop the search */ in ZSTD_insertBtAndGetAllMatches()
772 matchIndex = nextPtr[0]; in ZSTD_insertBtAndGetAllMatches()
792 matchIndex = dictMatchIndex + dmsIndexDelta; in ZSTD_insertBtAndGetAllMatches()
794 (U32)matchLength, curr - matchIndex, OFFSET_TO_OFFBASE(curr - matchIndex)); in ZSTD_insertBtAndGetAllMatches()
795 if (matchLength > matchEndIdx - matchIndex) in ZSTD_insertBtAndGetAllMatches()
796 matchEndIdx = matchIndex + (U32)matchLength; in ZSTD_insertBtAndGetAllMatches()
798 matches[mnum].off = OFFSET_TO_OFFBASE(curr - matchIndex); in ZSTD_insertBtAndGetAllMatches()