Lines Matching refs:matchLength

299                    U32 const matchLength,  in ZSTD_getMatchPrice()  argument
305 U32 const mlBase = matchLength - MINMATCH; in ZSTD_getMatchPrice()
306 assert(matchLength >= MINMATCH); in ZSTD_getMatchPrice()
323 DEBUGLOG(8, "ZSTD_getMatchPrice(ml:%u) = %u", matchLength, price); in ZSTD_getMatchPrice()
331 U32 offsetCode, U32 matchLength) in ZSTD_updateStats() argument
355 { U32 const mlBase = matchLength - MINMATCH; in ZSTD_updateStats()
460 …size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of c… in ZSTD_insertBt1() local
484 if (!extDict || (matchIndex+matchLength >= dictLimit)) { in ZSTD_insertBt1()
485 assert(matchIndex+matchLength >= dictLimit); /* might be wrong if actually extDict */ in ZSTD_insertBt1()
487 matchLength += ZSTD_count(ip+matchLength, match+matchLength, iend); in ZSTD_insertBt1()
490matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iend, dictEnd, prefixStart); in ZSTD_insertBt1()
491 if (matchIndex+matchLength >= dictLimit) in ZSTD_insertBt1()
495 if (matchLength > bestLength) { in ZSTD_insertBt1()
496 bestLength = matchLength; in ZSTD_insertBt1()
497 if (matchLength > matchEndIdx - matchIndex) in ZSTD_insertBt1()
498 matchEndIdx = matchIndex + (U32)matchLength; in ZSTD_insertBt1()
501 if (ip+matchLength == iend) { /* equal : no way to know if inf or sup */ in ZSTD_insertBt1()
505 if (match[matchLength] < ip[matchLength]) { /* necessarily within buffer */ in ZSTD_insertBt1()
508 …commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common… in ZSTD_insertBt1()
515 commonLengthLarger = matchLength; in ZSTD_insertBt1()
692 …size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of c… in ZSTD_insertBtAndGetAllMatches() local
695 …de == ZSTD_noDict) || (dictMode == ZSTD_dictMatchState) || (matchIndex+matchLength >= dictLimit)) { in ZSTD_insertBtAndGetAllMatches()
696 … assert(matchIndex+matchLength >= dictLimit); /* ensure the condition is correct when !extDict */ in ZSTD_insertBtAndGetAllMatches()
698 …if (matchIndex >= dictLimit) assert(memcmp(match, ip, matchLength) == 0); /* ensure early section… in ZSTD_insertBtAndGetAllMatches()
699 matchLength += ZSTD_count(ip+matchLength, match+matchLength, iLimit); in ZSTD_insertBtAndGetAllMatches()
702 …assert(memcmp(match, ip, matchLength) == 0); /* ensure early section of match is equal as expecte… in ZSTD_insertBtAndGetAllMatches()
703matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iLimit, dictEnd, prefixStar… in ZSTD_insertBtAndGetAllMatches()
704 if (matchIndex+matchLength >= dictLimit) in ZSTD_insertBtAndGetAllMatches()
708 if (matchLength > bestLength) { in ZSTD_insertBtAndGetAllMatches()
710 (U32)matchLength, curr - matchIndex, STORE_OFFSET(curr - matchIndex)); in ZSTD_insertBtAndGetAllMatches()
712 if (matchLength > matchEndIdx - matchIndex) in ZSTD_insertBtAndGetAllMatches()
713 matchEndIdx = matchIndex + (U32)matchLength; in ZSTD_insertBtAndGetAllMatches()
714 bestLength = matchLength; in ZSTD_insertBtAndGetAllMatches()
716 matches[mnum].len = (U32)matchLength; in ZSTD_insertBtAndGetAllMatches()
718 if ( (matchLength > ZSTD_OPT_NUM) in ZSTD_insertBtAndGetAllMatches()
719 | (ip+matchLength == iLimit) /* equal : no way to know if inf or sup */) { in ZSTD_insertBtAndGetAllMatches()
724 if (match[matchLength] < ip[matchLength]) { in ZSTD_insertBtAndGetAllMatches()
727 …commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common… in ZSTD_insertBtAndGetAllMatches()
733 commonLengthLarger = matchLength; in ZSTD_insertBtAndGetAllMatches()
749 …size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of c… in ZSTD_insertBtAndGetAllMatches() local
751matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iLimit, dmsEnd, prefixStart… in ZSTD_insertBtAndGetAllMatches()
752 if (dictMatchIndex+matchLength >= dmsHighLimit) in ZSTD_insertBtAndGetAllMatches()
755 if (matchLength > bestLength) { 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()
761 bestLength = matchLength; in ZSTD_insertBtAndGetAllMatches()
763 matches[mnum].len = (U32)matchLength; in ZSTD_insertBtAndGetAllMatches()
765 if ( (matchLength > ZSTD_OPT_NUM) in ZSTD_insertBtAndGetAllMatches()
766 | (ip+matchLength == iLimit) /* equal : no way to know if inf or sup */) { in ZSTD_insertBtAndGetAllMatches()
771 if (match[matchLength] < ip[matchLength]) { in ZSTD_insertBtAndGetAllMatches()
772 …commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common… in ZSTD_insertBtAndGetAllMatches()
776 commonLengthLarger = matchLength; in ZSTD_insertBtAndGetAllMatches()
886 if (currPos >= currSeq.litLength + currSeq.matchLength) { in ZSTD_optLdm_skipRawSeqStoreBytes()
887 currPos -= currSeq.litLength + currSeq.matchLength; in ZSTD_optLdm_skipRawSeqStoreBytes()
921 assert(optLdm->seqStore.posInSequence <= currSeq.litLength + currSeq.matchLength); in ZSTD_opt_getNextMatchAndUpdateSeqStore()
927 currSeq.matchLength - ((U32)optLdm->seqStore.posInSequence - currSeq.litLength) : in ZSTD_opt_getNextMatchAndUpdateSeqStore()
928 currSeq.matchLength; in ZSTD_opt_getNextMatchAndUpdateSeqStore()