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()
116 …matchLength += 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
192 …matchLength += 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, ZSTD_REP_MOVE + curr - matchIndex, dictM… in ZSTD_DUBT_findBetterDictMatch()
201 bestLength = matchLength, *offsetPtr = ZSTD_REP_MOVE + 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()
322 …matchLength += 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 = ZSTD_REP_MOVE + 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()
944 size_t matchLength=0; in ZSTD_compressBlock_lazy_generic() local
958 … matchLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repMatchEnd, prefixLowest) + 4; in ZSTD_compressBlock_lazy_generic()
964 matchLength = ZSTD_count(ip+1+4, ip+1+4-offset_1, iend) + 4; in ZSTD_compressBlock_lazy_generic()
971 if (ml2 > matchLength) in ZSTD_compressBlock_lazy_generic()
972 matchLength = ml2, start = ip, offset=offsetFound; in ZSTD_compressBlock_lazy_generic()
975 if (matchLength < 4) { in ZSTD_compressBlock_lazy_generic()
988 int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)offset+1) + 1); in ZSTD_compressBlock_lazy_generic()
990 matchLength = mlRep, offset = 0, start = ip; in ZSTD_compressBlock_lazy_generic()
1002 int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)offset+1) + 1); in ZSTD_compressBlock_lazy_generic()
1004 matchLength = mlRep, offset = 0, start = ip; in ZSTD_compressBlock_lazy_generic()
1010 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 4); in ZSTD_compressBlock_lazy_generic()
1012 matchLength = ml2, offset = offset2, start = ip; in ZSTD_compressBlock_lazy_generic()
1023 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 1); in ZSTD_compressBlock_lazy_generic()
1025 matchLength = mlRep, offset = 0, start = ip; in ZSTD_compressBlock_lazy_generic()
1037 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 1); in ZSTD_compressBlock_lazy_generic()
1039 matchLength = mlRep, offset = 0, start = ip; in ZSTD_compressBlock_lazy_generic()
1045 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 7); in ZSTD_compressBlock_lazy_generic()
1047 matchLength = ml2, offset = offset2, start = ip; in ZSTD_compressBlock_lazy_generic()
1063 { start--; matchLength++; } in ZSTD_compressBlock_lazy_generic()
1069 …or) && (match>mStart) && (start[-1] == match[-1])) { start--; match--; matchLength++; } /* catch … in ZSTD_compressBlock_lazy_generic()
1076 ZSTD_storeSeq(seqStore, litLength, anchor, iend, (U32)offset, matchLength-MINMATCH); in ZSTD_compressBlock_lazy_generic()
1077 anchor = ip = start + matchLength; in ZSTD_compressBlock_lazy_generic()
1091 … matchLength = ZSTD_count_2segments(ip+4, repMatch+4, iend, repEnd2, prefixLowest) + 4; in ZSTD_compressBlock_lazy_generic()
1093 ZSTD_storeSeq(seqStore, 0, anchor, iend, 0, matchLength-MINMATCH); in ZSTD_compressBlock_lazy_generic()
1094 ip += matchLength; in ZSTD_compressBlock_lazy_generic()
1106 matchLength = ZSTD_count(ip+4, ip+4-offset_2, iend) + 4; in ZSTD_compressBlock_lazy_generic()
1108 ZSTD_storeSeq(seqStore, 0, anchor, iend, 0, matchLength-MINMATCH); in ZSTD_compressBlock_lazy_generic()
1109 ip += matchLength; in ZSTD_compressBlock_lazy_generic()
1242 size_t matchLength=0; in ZSTD_compressBlock_lazy_extDict_generic() local
1256 … matchLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repEnd, prefixStart) + 4; in ZSTD_compressBlock_lazy_extDict_generic()
1263 if (ml2 > matchLength) in ZSTD_compressBlock_lazy_extDict_generic()
1264 matchLength = ml2, start = ip, offset=offsetFound; in ZSTD_compressBlock_lazy_extDict_generic()
1267 if (matchLength < 4) { in ZSTD_compressBlock_lazy_extDict_generic()
1289 int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)offset+1) + 1); in ZSTD_compressBlock_lazy_extDict_generic()
1291 matchLength = repLength, offset = 0, start = ip; in ZSTD_compressBlock_lazy_extDict_generic()
1298 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 4); in ZSTD_compressBlock_lazy_extDict_generic()
1300 matchLength = ml2, offset = offset2, start = ip; in ZSTD_compressBlock_lazy_extDict_generic()
1320 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 1); in ZSTD_compressBlock_lazy_extDict_generic()
1322 matchLength = repLength, offset = 0, start = ip; in ZSTD_compressBlock_lazy_extDict_generic()
1329 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 7); in ZSTD_compressBlock_lazy_extDict_generic()
1331 matchLength = ml2, offset = offset2, start = ip; in ZSTD_compressBlock_lazy_extDict_generic()
1342 …or) && (match>mStart) && (start[-1] == match[-1])) { start--; match--; matchLength++; } /* catch … in ZSTD_compressBlock_lazy_extDict_generic()
1349 ZSTD_storeSeq(seqStore, litLength, anchor, iend, (U32)offset, matchLength-MINMATCH); in ZSTD_compressBlock_lazy_extDict_generic()
1350 anchor = ip = start + matchLength; in ZSTD_compressBlock_lazy_extDict_generic()
1364 matchLength = ZSTD_count_2segments(ip+4, repMatch+4, iend, repEnd, prefixStart) + 4; in ZSTD_compressBlock_lazy_extDict_generic()
1366 ZSTD_storeSeq(seqStore, 0, anchor, iend, 0, matchLength-MINMATCH); in ZSTD_compressBlock_lazy_extDict_generic()
1367 ip += matchLength; in ZSTD_compressBlock_lazy_extDict_generic()