Lines Matching refs:matchLength

4198     unsigned int matchLength; /* Match length */  member
6626 U16 matchLength; member
6645 U32 matchLength; member
6656 seqLen.matchLength = seq->matchLength + MINMATCH; in ZSTD_getSequenceLength()
6662 seqLen.matchLength += 0xFFFF; in ZSTD_getSequenceLength()
10096 U32 matchLength; member
10396 seqStorePtr->sequences[0].matchLength = (U16)mlBase; in ZSTD_storeSeq()
10500 size_t const matchLength = ZSTD_count(ip, match, vEnd); in ZSTD_count_2segments() local
10501 if (match + matchLength != mEnd) return matchLength; in ZSTD_count_2segments()
10502 DEBUGLOG(7, "ZSTD_count_2segments: found a 2-parts match (current length==%zu)", matchLength); in ZSTD_count_2segments()
10505 DEBUGLOG(7, "next byte : ip==%02X, istart==%02X", ip[matchLength], *iStart); in ZSTD_count_2segments()
10506 DEBUGLOG(7, "final match length = %zu", matchLength + ZSTD_count(ip+matchLength, iStart, iEnd)); in ZSTD_count_2segments()
10507 return matchLength + ZSTD_count(ip+matchLength, iStart, iEnd); in ZSTD_count_2segments()
11545 BIT_addBits(&blockStream, sequences[nbSeq-1].matchLength, ML_bits[mlCodeTable[nbSeq-1]]); in ZSTD_encodeSequences_body()
11571 (unsigned)sequences[n].matchLength + MINMATCH, in ZSTD_encodeSequences_body()
11583 BIT_addBits(&blockStream, sequences[n].matchLength, mlBits); in ZSTD_encodeSequences_body()
12122 matchLengthSum += seqLen.matchLength; in ZSTD_seqDecompressedSize()
15022 U32 const mlv = sequences[u].matchLength; in ZSTD_seqToCodes()
15409 outSeqs[i].matchLength = seqs[i].matchLength + MINMATCH; in ZSTD_copyBlockSequences()
15415 outSeqs[i].matchLength += 0x10000; in ZSTD_copyBlockSequences()
15442 position += outSeqs[i].matchLength; in ZSTD_copyBlockSequences()
18481 …size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of c… in ZSTD_insertDUBT1() local
18488 || (matchIndex+matchLength >= dictLimit) /* both in current segment*/ in ZSTD_insertDUBT1()
18491 || (matchIndex+matchLength >= dictLimit)) ? in ZSTD_insertDUBT1()
18493 …assert( (matchIndex+matchLength >= dictLimit) /* might be wrong if extDict is incorrectly set to… in ZSTD_insertDUBT1()
18496 matchLength += ZSTD_count(ip+matchLength, match+matchLength, iend); in ZSTD_insertDUBT1()
18499 …matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iend, dictEnd, prefixStart); in ZSTD_insertDUBT1()
18500 if (matchIndex+matchLength >= dictLimit) in ZSTD_insertDUBT1()
18505 current, matchIndex, (U32)matchLength); in ZSTD_insertDUBT1()
18507 if (ip+matchLength == iend) { /* equal : no way to know if inf or sup */ in ZSTD_insertDUBT1()
18511 if (match[matchLength] < ip[matchLength]) { /* necessarily within buffer */ in ZSTD_insertDUBT1()
18514 …commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common… in ZSTD_insertDUBT1()
18523 commonLengthLarger = matchLength; in ZSTD_insertDUBT1()
18573 …size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of c… in ZSTD_DUBT_findBetterDictMatch() local
18575 …matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iend, dictEnd, prefixStart); in ZSTD_DUBT_findBetterDictMatch()
18576 if (dictMatchIndex+matchLength >= dictHighLimit) in ZSTD_DUBT_findBetterDictMatch()
18579 if (matchLength > bestLength) { in ZSTD_DUBT_findBetterDictMatch()
18581 …if ( (4*(int)(matchLength-bestLength)) > (int)(ZSTD_highbit32(current-matchIndex+1) - ZSTD_highbit… in ZSTD_DUBT_findBetterDictMatch()
18583 …current, (U32)bestLength, (U32)matchLength, (U32)*offsetPtr, ZSTD_REP_MOVE + current - matchIndex,… in ZSTD_DUBT_findBetterDictMatch()
18584 bestLength = matchLength, *offsetPtr = ZSTD_REP_MOVE + current - matchIndex; in ZSTD_DUBT_findBetterDictMatch()
18586 …if (ip+matchLength == iend) { /* reached end of input : ip[matchLength] is not valid, no way to … in ZSTD_DUBT_findBetterDictMatch()
18591 if (match[matchLength] < ip[matchLength]) { in ZSTD_DUBT_findBetterDictMatch()
18593 …commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common… in ZSTD_DUBT_findBetterDictMatch()
18598 commonLengthLarger = matchLength; in ZSTD_DUBT_findBetterDictMatch()
18696 …size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of c… in ZSTD_DUBT_findBestMatch() local
18699 if ((dictMode != ZSTD_extDict) || (matchIndex+matchLength >= dictLimit)) { in ZSTD_DUBT_findBestMatch()
18701 matchLength += ZSTD_count(ip+matchLength, match+matchLength, iend); in ZSTD_DUBT_findBestMatch()
18704 …matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iend, dictEnd, prefixStart); in ZSTD_DUBT_findBestMatch()
18705 if (matchIndex+matchLength >= dictLimit) in ZSTD_DUBT_findBestMatch()
18709 if (matchLength > bestLength) { in ZSTD_DUBT_findBestMatch()
18710 if (matchLength > matchEndIdx - matchIndex) in ZSTD_DUBT_findBestMatch()
18711 matchEndIdx = matchIndex + (U32)matchLength; in ZSTD_DUBT_findBestMatch()
18712 …if ( (4*(int)(matchLength-bestLength)) > (int)(ZSTD_highbit32(current-matchIndex+1) - ZSTD_highbit… in ZSTD_DUBT_findBestMatch()
18713 bestLength = matchLength, *offsetPtr = ZSTD_REP_MOVE + current - matchIndex; in ZSTD_DUBT_findBestMatch()
18714 if (ip+matchLength == iend) { /* equal : no way to know if inf or sup */ in ZSTD_DUBT_findBestMatch()
18724 if (match[matchLength] < ip[matchLength]) { in ZSTD_DUBT_findBestMatch()
18727 …commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common… in ZSTD_DUBT_findBestMatch()
18734 commonLengthLarger = matchLength; in ZSTD_DUBT_findBestMatch()
19074 size_t matchLength=0; in ZSTD_compressBlock_lazy_generic() local
19088 … matchLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repMatchEnd, prefixLowest) + 4; in ZSTD_compressBlock_lazy_generic()
19094 matchLength = ZSTD_count(ip+1+4, ip+1+4-offset_1, iend) + 4; in ZSTD_compressBlock_lazy_generic()
19101 if (ml2 > matchLength) in ZSTD_compressBlock_lazy_generic()
19102 matchLength = ml2, start = ip, offset=offsetFound; in ZSTD_compressBlock_lazy_generic()
19105 if (matchLength < 4) { in ZSTD_compressBlock_lazy_generic()
19118 int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)offset+1) + 1); in ZSTD_compressBlock_lazy_generic()
19120 matchLength = mlRep, offset = 0, start = ip; in ZSTD_compressBlock_lazy_generic()
19132 int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)offset+1) + 1); in ZSTD_compressBlock_lazy_generic()
19134 matchLength = mlRep, offset = 0, start = ip; in ZSTD_compressBlock_lazy_generic()
19140 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 4); in ZSTD_compressBlock_lazy_generic()
19142 matchLength = ml2, offset = offset2, start = ip; in ZSTD_compressBlock_lazy_generic()
19153 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 1); in ZSTD_compressBlock_lazy_generic()
19155 matchLength = mlRep, offset = 0, start = ip; in ZSTD_compressBlock_lazy_generic()
19167 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 1); in ZSTD_compressBlock_lazy_generic()
19169 matchLength = mlRep, offset = 0, start = ip; in ZSTD_compressBlock_lazy_generic()
19175 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 7); in ZSTD_compressBlock_lazy_generic()
19177 matchLength = ml2, offset = offset2, start = ip; in ZSTD_compressBlock_lazy_generic()
19193 { start--; matchLength++; } in ZSTD_compressBlock_lazy_generic()
19199 …or) && (match>mStart) && (start[-1] == match[-1])) { start--; match--; matchLength++; } /* catch … in ZSTD_compressBlock_lazy_generic()
19206 ZSTD_storeSeq(seqStore, litLength, anchor, iend, (U32)offset, matchLength-MINMATCH); in ZSTD_compressBlock_lazy_generic()
19207 anchor = ip = start + matchLength; in ZSTD_compressBlock_lazy_generic()
19222 … matchLength = ZSTD_count_2segments(ip+4, repMatch+4, iend, repEnd2, prefixLowest) + 4; in ZSTD_compressBlock_lazy_generic()
19224 ZSTD_storeSeq(seqStore, 0, anchor, iend, 0, matchLength-MINMATCH); in ZSTD_compressBlock_lazy_generic()
19225 ip += matchLength; in ZSTD_compressBlock_lazy_generic()
19237 matchLength = ZSTD_count(ip+4, ip+4-offset_2, iend) + 4; in ZSTD_compressBlock_lazy_generic()
19239 ZSTD_storeSeq(seqStore, 0, anchor, iend, 0, matchLength-MINMATCH); in ZSTD_compressBlock_lazy_generic()
19240 ip += matchLength; in ZSTD_compressBlock_lazy_generic()
19351 size_t matchLength=0; in ZSTD_compressBlock_lazy_extDict_generic() local
19365 … matchLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repEnd, prefixStart) + 4; in ZSTD_compressBlock_lazy_extDict_generic()
19372 if (ml2 > matchLength) in ZSTD_compressBlock_lazy_extDict_generic()
19373 matchLength = ml2, start = ip, offset=offsetFound; in ZSTD_compressBlock_lazy_extDict_generic()
19376 if (matchLength < 4) { in ZSTD_compressBlock_lazy_extDict_generic()
19398 int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)offset+1) + 1); in ZSTD_compressBlock_lazy_extDict_generic()
19400 matchLength = repLength, offset = 0, start = ip; in ZSTD_compressBlock_lazy_extDict_generic()
19407 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 4); in ZSTD_compressBlock_lazy_extDict_generic()
19409 matchLength = ml2, offset = offset2, start = ip; in ZSTD_compressBlock_lazy_extDict_generic()
19429 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 1); in ZSTD_compressBlock_lazy_extDict_generic()
19431 matchLength = repLength, offset = 0, start = ip; in ZSTD_compressBlock_lazy_extDict_generic()
19438 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 7); in ZSTD_compressBlock_lazy_extDict_generic()
19440 matchLength = ml2, offset = offset2, start = ip; in ZSTD_compressBlock_lazy_extDict_generic()
19451 …or) && (match>mStart) && (start[-1] == match[-1])) { start--; match--; matchLength++; } /* catch … in ZSTD_compressBlock_lazy_extDict_generic()
19458 ZSTD_storeSeq(seqStore, litLength, anchor, iend, (U32)offset, matchLength-MINMATCH); in ZSTD_compressBlock_lazy_extDict_generic()
19459 anchor = ip = start + matchLength; in ZSTD_compressBlock_lazy_extDict_generic()
19473 matchLength = ZSTD_count_2segments(ip+4, repMatch+4, iend, repEnd, prefixStart) + 4; in ZSTD_compressBlock_lazy_extDict_generic()
19475 ZSTD_storeSeq(seqStore, 0, anchor, iend, 0, matchLength-MINMATCH); in ZSTD_compressBlock_lazy_extDict_generic()
19476 ip += matchLength; in ZSTD_compressBlock_lazy_extDict_generic()
19678 size_t matchLength = 0; in ZSTD_ldm_countBackwardsMatch() local
19682 matchLength++; in ZSTD_ldm_countBackwardsMatch()
19684 return matchLength; in ZSTD_ldm_countBackwardsMatch()
19914 seq->matchLength = (U32)mLength; in ZSTD_ldm_generateSequences_internal()
20039 if (srcSize < seq->matchLength) { in ZSTD_ldm_skipSequences()
20041 seq->matchLength -= (U32)srcSize; in ZSTD_ldm_skipSequences()
20042 if (seq->matchLength < minMatch) { in ZSTD_ldm_skipSequences()
20045 seq[1].litLength += seq[0].matchLength; in ZSTD_ldm_skipSequences()
20051 srcSize -= seq->matchLength; in ZSTD_ldm_skipSequences()
20052 seq->matchLength = 0; in ZSTD_ldm_skipSequences()
20070 if (remaining >= sequence.litLength + sequence.matchLength) { in maybeSplitSequence()
20077 } else if (remaining < sequence.litLength + sequence.matchLength) { in maybeSplitSequence()
20078 sequence.matchLength = remaining - sequence.litLength; in maybeSplitSequence()
20079 if (sequence.matchLength < minMatch) { in maybeSplitSequence()
20115 assert(ip + sequence.litLength + sequence.matchLength <= iend); in ZSTD_ldm_blockCompress()
20133 sequence.matchLength - MINMATCH); in ZSTD_ldm_blockCompress()
20134 ip += sequence.matchLength; in ZSTD_ldm_blockCompress()
20402 U32 const matchLength, in ZSTD_getMatchPrice() argument
20408 U32 const mlBase = matchLength - MINMATCH; in ZSTD_getMatchPrice()
20409 assert(matchLength >= MINMATCH); in ZSTD_getMatchPrice()
20426 DEBUGLOG(8, "ZSTD_getMatchPrice(ml:%u) = %u", matchLength, price); in ZSTD_getMatchPrice()
20434 U32 offsetCode, U32 matchLength) in ZSTD_updateStats() argument
20458 { U32 const mlBase = matchLength - MINMATCH; in ZSTD_updateStats()
20557 …size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of c… in ZSTD_insertBt1() local
20581 if (!extDict || (matchIndex+matchLength >= dictLimit)) { in ZSTD_insertBt1()
20582 assert(matchIndex+matchLength >= dictLimit); /* might be wrong if actually extDict */ in ZSTD_insertBt1()
20584 matchLength += ZSTD_count(ip+matchLength, match+matchLength, iend); in ZSTD_insertBt1()
20587 …matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iend, dictEnd, prefixStart); in ZSTD_insertBt1()
20588 if (matchIndex+matchLength >= dictLimit) in ZSTD_insertBt1()
20592 if (matchLength > bestLength) { in ZSTD_insertBt1()
20593 bestLength = matchLength; in ZSTD_insertBt1()
20594 if (matchLength > matchEndIdx - matchIndex) in ZSTD_insertBt1()
20595 matchEndIdx = matchIndex + (U32)matchLength; in ZSTD_insertBt1()
20598 if (ip+matchLength == iend) { /* equal : no way to know if inf or sup */ in ZSTD_insertBt1()
20602 if (match[matchLength] < ip[matchLength]) { /* necessarily within buffer */ in ZSTD_insertBt1()
20605 …commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common… in ZSTD_insertBt1()
20612 commonLengthLarger = matchLength; in ZSTD_insertBt1()
20789 …size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of c… in ZSTD_insertBtAndGetAllMatches() local
20792 …de == ZSTD_noDict) || (dictMode == ZSTD_dictMatchState) || (matchIndex+matchLength >= dictLimit)) { in ZSTD_insertBtAndGetAllMatches()
20793 … assert(matchIndex+matchLength >= dictLimit); /* ensure the condition is correct when !extDict */ in ZSTD_insertBtAndGetAllMatches()
20795 …if (matchIndex >= dictLimit) assert(memcmp(match, ip, matchLength) == 0); /* ensure early section… in ZSTD_insertBtAndGetAllMatches()
20796 matchLength += ZSTD_count(ip+matchLength, match+matchLength, iLimit); in ZSTD_insertBtAndGetAllMatches()
20799 …assert(memcmp(match, ip, matchLength) == 0); /* ensure early section of match is equal as expecte… in ZSTD_insertBtAndGetAllMatches()
20800 …matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iLimit, dictEnd, prefixStar… in ZSTD_insertBtAndGetAllMatches()
20801 if (matchIndex+matchLength >= dictLimit) in ZSTD_insertBtAndGetAllMatches()
20805 if (matchLength > bestLength) { in ZSTD_insertBtAndGetAllMatches()
20807 (U32)matchLength, current - matchIndex, current - matchIndex + ZSTD_REP_MOVE); in ZSTD_insertBtAndGetAllMatches()
20809 if (matchLength > matchEndIdx - matchIndex) in ZSTD_insertBtAndGetAllMatches()
20810 matchEndIdx = matchIndex + (U32)matchLength; in ZSTD_insertBtAndGetAllMatches()
20811 bestLength = matchLength; in ZSTD_insertBtAndGetAllMatches()
20813 matches[mnum].len = (U32)matchLength; in ZSTD_insertBtAndGetAllMatches()
20815 if ( (matchLength > ZSTD_OPT_NUM) in ZSTD_insertBtAndGetAllMatches()
20816 | (ip+matchLength == iLimit) /* equal : no way to know if inf or sup */) { in ZSTD_insertBtAndGetAllMatches()
20822 if (match[matchLength] < ip[matchLength]) { in ZSTD_insertBtAndGetAllMatches()
20825 …commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common… in ZSTD_insertBtAndGetAllMatches()
20831 commonLengthLarger = matchLength; in ZSTD_insertBtAndGetAllMatches()
20846 …size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of c… in ZSTD_insertBtAndGetAllMatches() local
20848 …matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iLimit, dmsEnd, prefixStart… in ZSTD_insertBtAndGetAllMatches()
20849 if (dictMatchIndex+matchLength >= dmsHighLimit) in ZSTD_insertBtAndGetAllMatches()
20852 if (matchLength > bestLength) { in ZSTD_insertBtAndGetAllMatches()
20855 … (U32)matchLength, current - matchIndex, current - matchIndex + ZSTD_REP_MOVE); in ZSTD_insertBtAndGetAllMatches()
20856 if (matchLength > matchEndIdx - matchIndex) in ZSTD_insertBtAndGetAllMatches()
20857 matchEndIdx = matchIndex + (U32)matchLength; in ZSTD_insertBtAndGetAllMatches()
20858 bestLength = matchLength; in ZSTD_insertBtAndGetAllMatches()
20860 matches[mnum].len = (U32)matchLength; in ZSTD_insertBtAndGetAllMatches()
20862 if ( (matchLength > ZSTD_OPT_NUM) in ZSTD_insertBtAndGetAllMatches()
20863 | (ip+matchLength == iLimit) /* equal : no way to know if inf or sup */) { in ZSTD_insertBtAndGetAllMatches()
20869 if (match[matchLength] < ip[matchLength]) { in ZSTD_insertBtAndGetAllMatches()
20870 …commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common… in ZSTD_insertBtAndGetAllMatches()
20874 commonLengthLarger = matchLength; in ZSTD_insertBtAndGetAllMatches()
26946 size_t matchLength; member
27058 size_t const sequenceLength = sequence.litLength + sequence.matchLength; in ZSTD_execSequenceEnd()
27079 if (match + sequence.matchLength <= dictEnd) { in ZSTD_execSequenceEnd()
27080 memmove(oLitEnd, match, sequence.matchLength); in ZSTD_execSequenceEnd()
27087 sequence.matchLength -= length1; in ZSTD_execSequenceEnd()
27090 ZSTD_safecopy(op, oend_w, match, sequence.matchLength, ZSTD_overlap_src_before_dst); in ZSTD_execSequenceEnd()
27101 size_t const sequenceLength = sequence.litLength + sequence.matchLength; in ZSTD_execSequence()
27145 if (match + sequence.matchLength <= dictEnd) { in ZSTD_execSequence()
27146 memmove(oLitEnd, match, sequence.matchLength); in ZSTD_execSequence()
27153 sequence.matchLength -= length1; in ZSTD_execSequence()
27160 assert(sequence.matchLength >= 1); in ZSTD_execSequence()
27170 ZSTD_wildcopy(op, match, (ptrdiff_t)sequence.matchLength, ZSTD_no_overlap); in ZSTD_execSequence()
27179 if (sequence.matchLength > 8) { in ZSTD_execSequence()
27181 ZSTD_wildcopy(op, match, (ptrdiff_t)sequence.matchLength-8, ZSTD_overlap_src_before_dst); in ZSTD_execSequence()
27283 seq.matchLength = mlBase; in ZSTD_decodeSequence()
27285 seq.matchLength += BIT_readBitsFast(&seqState->DStream, mlBits/*>0*/); in ZSTD_decodeSequence()
27302 (U32)seq.litLength, (U32)seq.matchLength, (U32)seq.offset); in ZSTD_decodeSequence()
27309 seqState->pos = pos + seq.matchLength; in ZSTD_decodeSequence()
27364 size_t const sequenceSize = seq.litLength + seq.matchLength; in ZSTD_assertValidSequence()
27367 (U32)seq.litLength, (U32)seq.matchLength, (U32)seq.offset); in ZSTD_assertValidSequence()
27564 …s[seqNb].match); PREFETCH_L1(sequences[seqNb].match + sequences[seqNb].matchLength - 1); /* note :… in ZSTD_decompressSequencesLong_body()
27577 …PREFETCH_L1(sequence.match); PREFETCH_L1(sequence.match + sequence.matchLength - 1); /* note : it'… in ZSTD_decompressSequencesLong_body()