Lines Matching refs:matchIndex

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