Lines Matching refs:matchLength

98 …size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger);   /* guaranteed minimum nb of c…  in ZSTD_insertDUBT1()  local
105 || (matchIndex+matchLength >= dictLimit) /* both in current segment*/ in ZSTD_insertDUBT1()
108 || (matchIndex+matchLength >= dictLimit)) ? in ZSTD_insertDUBT1()
110 …assert( (matchIndex+matchLength >= dictLimit) /* might be wrong if extDict is incorrectly set to… in ZSTD_insertDUBT1()
113 matchLength += ZSTD_count(ip+matchLength, match+matchLength, iend); in ZSTD_insertDUBT1()
116matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iend, dictEnd, prefixStart); in ZSTD_insertDUBT1()
117 if (matchIndex+matchLength >= dictLimit) in ZSTD_insertDUBT1()
122 curr, matchIndex, (U32)matchLength); in ZSTD_insertDUBT1()
124 if (ip+matchLength == iend) { /* equal : no way to know if inf or sup */ in ZSTD_insertDUBT1()
128 if (match[matchLength] < ip[matchLength]) { /* necessarily within buffer */ in ZSTD_insertDUBT1()
131 …commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common… in ZSTD_insertDUBT1()
140 commonLengthLarger = matchLength; in ZSTD_insertDUBT1()
190 …size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of c… in ZSTD_DUBT_findBetterDictMatch() local
192matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iend, dictEnd, prefixStart); in ZSTD_DUBT_findBetterDictMatch()
193 if (dictMatchIndex+matchLength >= dictHighLimit) in ZSTD_DUBT_findBetterDictMatch()
196 if (matchLength > bestLength) { in ZSTD_DUBT_findBetterDictMatch()
198 …if ( (4*(int)(matchLength-bestLength)) > (int)(ZSTD_highbit32(curr-matchIndex+1) - ZSTD_highbit32(… in ZSTD_DUBT_findBetterDictMatch()
200 …curr, (U32)bestLength, (U32)matchLength, (U32)*offsetPtr, STORE_OFFSET(curr - matchIndex), dictMat… in ZSTD_DUBT_findBetterDictMatch()
201 bestLength = matchLength, *offsetPtr = STORE_OFFSET(curr - matchIndex); in ZSTD_DUBT_findBetterDictMatch()
203 …if (ip+matchLength == iend) { /* reached end of input : ip[matchLength] is not valid, no way to … in ZSTD_DUBT_findBetterDictMatch()
208 if (match[matchLength] < ip[matchLength]) { in ZSTD_DUBT_findBetterDictMatch()
210 …commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common… in ZSTD_DUBT_findBetterDictMatch()
215 commonLengthLarger = matchLength; in ZSTD_DUBT_findBetterDictMatch()
314 …size_t matchLength = MIN(commonLengthSmaller, commonLengthLarger); /* guaranteed minimum nb of c… in ZSTD_DUBT_findBestMatch() local
317 if ((dictMode != ZSTD_extDict) || (matchIndex+matchLength >= dictLimit)) { in ZSTD_DUBT_findBestMatch()
319 matchLength += ZSTD_count(ip+matchLength, match+matchLength, iend); in ZSTD_DUBT_findBestMatch()
322matchLength += ZSTD_count_2segments(ip+matchLength, match+matchLength, iend, dictEnd, prefixStart); in ZSTD_DUBT_findBestMatch()
323 if (matchIndex+matchLength >= dictLimit) in ZSTD_DUBT_findBestMatch()
327 if (matchLength > bestLength) { in ZSTD_DUBT_findBestMatch()
328 if (matchLength > matchEndIdx - matchIndex) in ZSTD_DUBT_findBestMatch()
329 matchEndIdx = matchIndex + (U32)matchLength; in ZSTD_DUBT_findBestMatch()
330 …if ( (4*(int)(matchLength-bestLength)) > (int)(ZSTD_highbit32(curr-matchIndex+1) - ZSTD_highbit32(… in ZSTD_DUBT_findBestMatch()
331 bestLength = matchLength, *offsetPtr = STORE_OFFSET(curr - matchIndex); in ZSTD_DUBT_findBestMatch()
332 if (ip+matchLength == iend) { /* equal : no way to know if inf or sup */ in ZSTD_DUBT_findBestMatch()
342 if (match[matchLength] < ip[matchLength]) { in ZSTD_DUBT_findBestMatch()
345 …commonLengthSmaller = matchLength; /* all smaller will now have at least this guaranteed common… in ZSTD_DUBT_findBestMatch()
352 commonLengthLarger = matchLength; in ZSTD_DUBT_findBestMatch()
1539 size_t matchLength=0; in ZSTD_compressBlock_lazy_generic() local
1554matchLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repMatchEnd, prefixLowest) + 4; in ZSTD_compressBlock_lazy_generic()
1560 matchLength = ZSTD_count(ip+1+4, ip+1+4-offset_1, iend) + 4; in ZSTD_compressBlock_lazy_generic()
1567 if (ml2 > matchLength) in ZSTD_compressBlock_lazy_generic()
1568 matchLength = ml2, start = ip, offcode=offsetFound; in ZSTD_compressBlock_lazy_generic()
1571 if (matchLength < 4) { in ZSTD_compressBlock_lazy_generic()
1585 … int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 1); in ZSTD_compressBlock_lazy_generic()
1587 matchLength = mlRep, offcode = STORE_REPCODE_1, start = ip; in ZSTD_compressBlock_lazy_generic()
1599 … int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 1); in ZSTD_compressBlock_lazy_generic()
1601 matchLength = mlRep, offcode = STORE_REPCODE_1, start = ip; in ZSTD_compressBlock_lazy_generic()
1607 … int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 4); in ZSTD_compressBlock_lazy_generic()
1609 matchLength = ml2, offcode = offset2, start = ip; in ZSTD_compressBlock_lazy_generic()
1621 … int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 1); in ZSTD_compressBlock_lazy_generic()
1623 matchLength = mlRep, offcode = STORE_REPCODE_1, start = ip; in ZSTD_compressBlock_lazy_generic()
1635 … int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 1); in ZSTD_compressBlock_lazy_generic()
1637 matchLength = mlRep, offcode = STORE_REPCODE_1, start = ip; in ZSTD_compressBlock_lazy_generic()
1643 … int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 7); in ZSTD_compressBlock_lazy_generic()
1645 matchLength = ml2, offcode = offset2, start = ip; in ZSTD_compressBlock_lazy_generic()
1660 { start--; matchLength++; } in ZSTD_compressBlock_lazy_generic()
1666 …or) && (match>mStart) && (start[-1] == match[-1])) { start--; match--; matchLength++; } /* catch … in ZSTD_compressBlock_lazy_generic()
1673 ZSTD_storeSeq(seqStore, litLength, anchor, iend, (U32)offcode, matchLength); in ZSTD_compressBlock_lazy_generic()
1674 anchor = ip = start + matchLength; in ZSTD_compressBlock_lazy_generic()
1688matchLength = ZSTD_count_2segments(ip+4, repMatch+4, iend, repEnd2, prefixLowest) + 4; in ZSTD_compressBlock_lazy_generic()
1690 ZSTD_storeSeq(seqStore, 0, anchor, iend, STORE_REPCODE_1, matchLength); in ZSTD_compressBlock_lazy_generic()
1691 ip += matchLength; in ZSTD_compressBlock_lazy_generic()
1703 matchLength = ZSTD_count(ip+4, ip+4-offset_2, iend) + 4; in ZSTD_compressBlock_lazy_generic()
1705 ZSTD_storeSeq(seqStore, 0, anchor, iend, STORE_REPCODE_1, matchLength); in ZSTD_compressBlock_lazy_generic()
1706 ip += matchLength; in ZSTD_compressBlock_lazy_generic()
1905 size_t matchLength=0; in ZSTD_compressBlock_lazy_extDict_generic() local
1920matchLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repEnd, prefixStart) + 4; in ZSTD_compressBlock_lazy_extDict_generic()
1927 if (ml2 > matchLength) in ZSTD_compressBlock_lazy_extDict_generic()
1928 matchLength = ml2, start = ip, offcode=offsetFound; in ZSTD_compressBlock_lazy_extDict_generic()
1931 if (matchLength < 4) { in ZSTD_compressBlock_lazy_extDict_generic()
1954 … int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 1); in ZSTD_compressBlock_lazy_extDict_generic()
1956 matchLength = repLength, offcode = STORE_REPCODE_1, start = ip; in ZSTD_compressBlock_lazy_extDict_generic()
1963 … int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 4); in ZSTD_compressBlock_lazy_extDict_generic()
1965 matchLength = ml2, offcode = offset2, start = ip; in ZSTD_compressBlock_lazy_extDict_generic()
1986 … int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 1); in ZSTD_compressBlock_lazy_extDict_generic()
1988 matchLength = repLength, offcode = STORE_REPCODE_1, start = ip; in ZSTD_compressBlock_lazy_extDict_generic()
1995 … int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 7); in ZSTD_compressBlock_lazy_extDict_generic()
1997 matchLength = ml2, offcode = offset2, start = ip; in ZSTD_compressBlock_lazy_extDict_generic()
2008 …or) && (match>mStart) && (start[-1] == match[-1])) { start--; match--; matchLength++; } /* catch … in ZSTD_compressBlock_lazy_extDict_generic()
2015 ZSTD_storeSeq(seqStore, litLength, anchor, iend, (U32)offcode, matchLength); in ZSTD_compressBlock_lazy_extDict_generic()
2016 anchor = ip = start + matchLength; in ZSTD_compressBlock_lazy_extDict_generic()
2031 matchLength = ZSTD_count_2segments(ip+4, repMatch+4, iend, repEnd, prefixStart) + 4; in ZSTD_compressBlock_lazy_extDict_generic()
2033 ZSTD_storeSeq(seqStore, 0, anchor, iend, STORE_REPCODE_1, matchLength); in ZSTD_compressBlock_lazy_extDict_generic()
2034 ip += matchLength; in ZSTD_compressBlock_lazy_extDict_generic()