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()
1541 size_t matchLength=0; in ZSTD_compressBlock_lazy_generic() local
1556matchLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repMatchEnd, prefixLowest) + 4; in ZSTD_compressBlock_lazy_generic()
1562 matchLength = ZSTD_count(ip+1+4, ip+1+4-offset_1, iend) + 4; in ZSTD_compressBlock_lazy_generic()
1569 if (ml2 > matchLength) in ZSTD_compressBlock_lazy_generic()
1570 matchLength = ml2, start = ip, offcode=offsetFound; in ZSTD_compressBlock_lazy_generic()
1573 if (matchLength < 4) { in ZSTD_compressBlock_lazy_generic()
1587 … int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 1); in ZSTD_compressBlock_lazy_generic()
1589 matchLength = mlRep, offcode = STORE_REPCODE_1, start = ip; in ZSTD_compressBlock_lazy_generic()
1601 … int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 1); in ZSTD_compressBlock_lazy_generic()
1603 matchLength = mlRep, offcode = STORE_REPCODE_1, start = ip; in ZSTD_compressBlock_lazy_generic()
1609 … int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 4); in ZSTD_compressBlock_lazy_generic()
1611 matchLength = ml2, offcode = offset2, start = ip; in ZSTD_compressBlock_lazy_generic()
1623 … int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 1); in ZSTD_compressBlock_lazy_generic()
1625 matchLength = mlRep, offcode = STORE_REPCODE_1, start = ip; in ZSTD_compressBlock_lazy_generic()
1637 … int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 1); in ZSTD_compressBlock_lazy_generic()
1639 matchLength = mlRep, offcode = STORE_REPCODE_1, start = ip; in ZSTD_compressBlock_lazy_generic()
1645 … int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 7); in ZSTD_compressBlock_lazy_generic()
1647 matchLength = ml2, offcode = offset2, start = ip; in ZSTD_compressBlock_lazy_generic()
1662 { start--; matchLength++; } in ZSTD_compressBlock_lazy_generic()
1668 …or) && (match>mStart) && (start[-1] == match[-1])) { start--; match--; matchLength++; } /* catch … in ZSTD_compressBlock_lazy_generic()
1675 ZSTD_storeSeq(seqStore, litLength, anchor, iend, (U32)offcode, matchLength); in ZSTD_compressBlock_lazy_generic()
1676 anchor = ip = start + matchLength; in ZSTD_compressBlock_lazy_generic()
1690matchLength = ZSTD_count_2segments(ip+4, repMatch+4, iend, repEnd2, prefixLowest) + 4; in ZSTD_compressBlock_lazy_generic()
1692 ZSTD_storeSeq(seqStore, 0, anchor, iend, STORE_REPCODE_1, matchLength); in ZSTD_compressBlock_lazy_generic()
1693 ip += matchLength; in ZSTD_compressBlock_lazy_generic()
1705 matchLength = ZSTD_count(ip+4, ip+4-offset_2, iend) + 4; in ZSTD_compressBlock_lazy_generic()
1707 ZSTD_storeSeq(seqStore, 0, anchor, iend, STORE_REPCODE_1, matchLength); in ZSTD_compressBlock_lazy_generic()
1708 ip += matchLength; in ZSTD_compressBlock_lazy_generic()
1907 size_t matchLength=0; in ZSTD_compressBlock_lazy_extDict_generic() local
1922matchLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repEnd, prefixStart) + 4; in ZSTD_compressBlock_lazy_extDict_generic()
1929 if (ml2 > matchLength) in ZSTD_compressBlock_lazy_extDict_generic()
1930 matchLength = ml2, start = ip, offcode=offsetFound; in ZSTD_compressBlock_lazy_extDict_generic()
1933 if (matchLength < 4) { in ZSTD_compressBlock_lazy_extDict_generic()
1956 … int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 1); in ZSTD_compressBlock_lazy_extDict_generic()
1958 matchLength = repLength, offcode = STORE_REPCODE_1, start = ip; in ZSTD_compressBlock_lazy_extDict_generic()
1965 … int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 4); in ZSTD_compressBlock_lazy_extDict_generic()
1967 matchLength = ml2, offcode = offset2, start = ip; in ZSTD_compressBlock_lazy_extDict_generic()
1988 … int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 1); in ZSTD_compressBlock_lazy_extDict_generic()
1990 matchLength = repLength, offcode = STORE_REPCODE_1, start = ip; in ZSTD_compressBlock_lazy_extDict_generic()
1997 … int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)STORED_TO_OFFBASE(offcode)) + 7); in ZSTD_compressBlock_lazy_extDict_generic()
1999 matchLength = ml2, offcode = offset2, start = ip; in ZSTD_compressBlock_lazy_extDict_generic()
2010 …or) && (match>mStart) && (start[-1] == match[-1])) { start--; match--; matchLength++; } /* catch … in ZSTD_compressBlock_lazy_extDict_generic()
2017 ZSTD_storeSeq(seqStore, litLength, anchor, iend, (U32)offcode, matchLength); in ZSTD_compressBlock_lazy_extDict_generic()
2018 anchor = ip = start + matchLength; in ZSTD_compressBlock_lazy_extDict_generic()
2033 matchLength = ZSTD_count_2segments(ip+4, repMatch+4, iend, repEnd, prefixStart) + 4; in ZSTD_compressBlock_lazy_extDict_generic()
2035 ZSTD_storeSeq(seqStore, 0, anchor, iend, STORE_REPCODE_1, matchLength); in ZSTD_compressBlock_lazy_extDict_generic()
2036 ip += matchLength; in ZSTD_compressBlock_lazy_extDict_generic()