Lines Matching refs:matchIndex

393     U32 matchIndex = hashTable[h];  in ZSTD_insertBt1()  local
423 for (; nbCompares && (matchIndex >= windowLow); --nbCompares) { in ZSTD_insertBt1()
424 U32* const nextPtr = bt + 2*(matchIndex & btMask); in ZSTD_insertBt1()
426 assert(matchIndex < curr); in ZSTD_insertBt1()
429 …const U32* predictPtr = bt + 2*((matchIndex-1) & btMask); /* written this way, as bt is a roll b… in ZSTD_insertBt1()
430 if (matchIndex == predictedSmall) { in ZSTD_insertBt1()
432 *smallerPtr = matchIndex; in ZSTD_insertBt1()
433 … if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop the search */ in ZSTD_insertBt1()
435matchIndex = nextPtr[1]; /* new matchIndex larger than previous (closer to current) */ in ZSTD_insertBt1()
439 if (matchIndex == predictedLarge) { in ZSTD_insertBt1()
440 *largerPtr = matchIndex; in ZSTD_insertBt1()
441 … if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop the search */ in ZSTD_insertBt1()
443 matchIndex = nextPtr[0]; in ZSTD_insertBt1()
449 if (!extDict || (matchIndex+matchLength >= dictLimit)) { in ZSTD_insertBt1()
450 assert(matchIndex+matchLength >= dictLimit); /* might be wrong if actually extDict */ in ZSTD_insertBt1()
451 match = base + matchIndex; in ZSTD_insertBt1()
454 match = dictBase + matchIndex; in ZSTD_insertBt1()
456 if (matchIndex+matchLength >= dictLimit) in ZSTD_insertBt1()
457 match = base + matchIndex; /* to prepare for next usage of match[matchLength] */ in ZSTD_insertBt1()
462 if (matchLength > matchEndIdx - matchIndex) in ZSTD_insertBt1()
463 matchEndIdx = matchIndex + (U32)matchLength; in ZSTD_insertBt1()
472 *smallerPtr = matchIndex; /* update smaller idx */ in ZSTD_insertBt1()
474 … if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop searching */ in ZSTD_insertBt1()
476matchIndex = nextPtr[1]; /* new matchIndex, larger than previous and closer to curren… in ZSTD_insertBt1()
479 *largerPtr = matchIndex; in ZSTD_insertBt1()
481 … if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop searching */ in ZSTD_insertBt1()
483 matchIndex = nextPtr[0]; in ZSTD_insertBt1()
539 U32 matchIndex = hashTable[h]; in ZSTD_insertBtAndGetAllMatches() local
654 for (; nbCompares && (matchIndex >= matchLow); --nbCompares) { in ZSTD_insertBtAndGetAllMatches()
655 U32* const nextPtr = bt + 2*(matchIndex & btMask); in ZSTD_insertBtAndGetAllMatches()
658 assert(curr > matchIndex); in ZSTD_insertBtAndGetAllMatches()
660 …if ((dictMode == ZSTD_noDict) || (dictMode == ZSTD_dictMatchState) || (matchIndex+matchLength >= d… in ZSTD_insertBtAndGetAllMatches()
661 … assert(matchIndex+matchLength >= dictLimit); /* ensure the condition is correct when !extDict */ in ZSTD_insertBtAndGetAllMatches()
662 match = base + matchIndex; in ZSTD_insertBtAndGetAllMatches()
663 …if (matchIndex >= dictLimit) assert(memcmp(match, ip, matchLength) == 0); /* ensure early section… in ZSTD_insertBtAndGetAllMatches()
666 match = dictBase + matchIndex; in ZSTD_insertBtAndGetAllMatches()
669 if (matchIndex+matchLength >= dictLimit) in ZSTD_insertBtAndGetAllMatches()
670 match = base + matchIndex; /* prepare for match[matchLength] read */ in ZSTD_insertBtAndGetAllMatches()
675 (U32)matchLength, curr - matchIndex, curr - matchIndex + ZSTD_REP_MOVE); in ZSTD_insertBtAndGetAllMatches()
676 assert(matchEndIdx > matchIndex); in ZSTD_insertBtAndGetAllMatches()
677 if (matchLength > matchEndIdx - matchIndex) in ZSTD_insertBtAndGetAllMatches()
678 matchEndIdx = matchIndex + (U32)matchLength; in ZSTD_insertBtAndGetAllMatches()
680 matches[mnum].off = (curr - matchIndex) + ZSTD_REP_MOVE; in ZSTD_insertBtAndGetAllMatches()
692 *smallerPtr = matchIndex; /* update smaller idx */ in ZSTD_insertBtAndGetAllMatches()
694 … if (matchIndex <= btLow) { smallerPtr=&dummy32; break; } /* beyond tree size, stop the search */ in ZSTD_insertBtAndGetAllMatches()
696matchIndex = nextPtr[1]; /* new matchIndex, larger than previous, closer to current */ in ZSTD_insertBtAndGetAllMatches()
698 *largerPtr = matchIndex; in ZSTD_insertBtAndGetAllMatches()
700 … if (matchIndex <= btLow) { largerPtr=&dummy32; break; } /* beyond tree size, stop the search */ in ZSTD_insertBtAndGetAllMatches()
702 matchIndex = nextPtr[0]; in ZSTD_insertBtAndGetAllMatches()
722 matchIndex = dictMatchIndex + dmsIndexDelta; in ZSTD_insertBtAndGetAllMatches()
724 (U32)matchLength, curr - matchIndex, curr - matchIndex + ZSTD_REP_MOVE); in ZSTD_insertBtAndGetAllMatches()
725 if (matchLength > matchEndIdx - matchIndex) in ZSTD_insertBtAndGetAllMatches()
726 matchEndIdx = matchIndex + (U32)matchLength; in ZSTD_insertBtAndGetAllMatches()
728 matches[mnum].off = (curr - matchIndex) + ZSTD_REP_MOVE; in ZSTD_insertBtAndGetAllMatches()