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, 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()
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 = 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()
946 size_t matchLength=0; in ZSTD_compressBlock_lazy_generic() local
960matchLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repMatchEnd, prefixLowest) + 4; in ZSTD_compressBlock_lazy_generic()
966 matchLength = ZSTD_count(ip+1+4, ip+1+4-offset_1, iend) + 4; in ZSTD_compressBlock_lazy_generic()
973 if (ml2 > matchLength) in ZSTD_compressBlock_lazy_generic()
974 matchLength = ml2, start = ip, offset=offsetFound; in ZSTD_compressBlock_lazy_generic()
977 if (matchLength < 4) { in ZSTD_compressBlock_lazy_generic()
990 int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)offset+1) + 1); in ZSTD_compressBlock_lazy_generic()
992 matchLength = mlRep, offset = 0, start = ip; in ZSTD_compressBlock_lazy_generic()
1004 int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)offset+1) + 1); in ZSTD_compressBlock_lazy_generic()
1006 matchLength = mlRep, offset = 0, start = ip; in ZSTD_compressBlock_lazy_generic()
1012 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 4); in ZSTD_compressBlock_lazy_generic()
1014 matchLength = ml2, offset = offset2, start = ip; in ZSTD_compressBlock_lazy_generic()
1025 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 1); in ZSTD_compressBlock_lazy_generic()
1027 matchLength = mlRep, offset = 0, start = ip; in ZSTD_compressBlock_lazy_generic()
1039 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 1); in ZSTD_compressBlock_lazy_generic()
1041 matchLength = mlRep, offset = 0, start = ip; in ZSTD_compressBlock_lazy_generic()
1047 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 7); in ZSTD_compressBlock_lazy_generic()
1049 matchLength = ml2, offset = offset2, start = ip; in ZSTD_compressBlock_lazy_generic()
1065 { start--; matchLength++; } in ZSTD_compressBlock_lazy_generic()
1071 …or) && (match>mStart) && (start[-1] == match[-1])) { start--; match--; matchLength++; } /* catch … in ZSTD_compressBlock_lazy_generic()
1078 ZSTD_storeSeq(seqStore, litLength, anchor, iend, (U32)offset, matchLength-MINMATCH); in ZSTD_compressBlock_lazy_generic()
1079 anchor = ip = start + matchLength; in ZSTD_compressBlock_lazy_generic()
1093matchLength = ZSTD_count_2segments(ip+4, repMatch+4, iend, repEnd2, prefixLowest) + 4; in ZSTD_compressBlock_lazy_generic()
1095 ZSTD_storeSeq(seqStore, 0, anchor, iend, 0, matchLength-MINMATCH); in ZSTD_compressBlock_lazy_generic()
1096 ip += matchLength; in ZSTD_compressBlock_lazy_generic()
1108 matchLength = ZSTD_count(ip+4, ip+4-offset_2, iend) + 4; in ZSTD_compressBlock_lazy_generic()
1110 ZSTD_storeSeq(seqStore, 0, anchor, iend, 0, matchLength-MINMATCH); in ZSTD_compressBlock_lazy_generic()
1111 ip += matchLength; in ZSTD_compressBlock_lazy_generic()
1244 size_t matchLength=0; in ZSTD_compressBlock_lazy_extDict_generic() local
1258matchLength = ZSTD_count_2segments(ip+1+4, repMatch+4, iend, repEnd, prefixStart) + 4; in ZSTD_compressBlock_lazy_extDict_generic()
1265 if (ml2 > matchLength) in ZSTD_compressBlock_lazy_extDict_generic()
1266 matchLength = ml2, start = ip, offset=offsetFound; in ZSTD_compressBlock_lazy_extDict_generic()
1269 if (matchLength < 4) { in ZSTD_compressBlock_lazy_extDict_generic()
1291 int const gain1 = (int)(matchLength*3 - ZSTD_highbit32((U32)offset+1) + 1); in ZSTD_compressBlock_lazy_extDict_generic()
1293 matchLength = repLength, offset = 0, start = ip; in ZSTD_compressBlock_lazy_extDict_generic()
1300 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 4); in ZSTD_compressBlock_lazy_extDict_generic()
1302 matchLength = ml2, offset = offset2, start = ip; in ZSTD_compressBlock_lazy_extDict_generic()
1322 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 1); in ZSTD_compressBlock_lazy_extDict_generic()
1324 matchLength = repLength, offset = 0, start = ip; in ZSTD_compressBlock_lazy_extDict_generic()
1331 int const gain1 = (int)(matchLength*4 - ZSTD_highbit32((U32)offset+1) + 7); in ZSTD_compressBlock_lazy_extDict_generic()
1333 matchLength = ml2, offset = offset2, start = ip; in ZSTD_compressBlock_lazy_extDict_generic()
1344 …or) && (match>mStart) && (start[-1] == match[-1])) { start--; match--; matchLength++; } /* catch … in ZSTD_compressBlock_lazy_extDict_generic()
1351 ZSTD_storeSeq(seqStore, litLength, anchor, iend, (U32)offset, matchLength-MINMATCH); in ZSTD_compressBlock_lazy_extDict_generic()
1352 anchor = ip = start + matchLength; in ZSTD_compressBlock_lazy_extDict_generic()
1366 matchLength = ZSTD_count_2segments(ip+4, repMatch+4, iend, repEnd, prefixStart) + 4; in ZSTD_compressBlock_lazy_extDict_generic()
1368 ZSTD_storeSeq(seqStore, 0, anchor, iend, 0, matchLength-MINMATCH); in ZSTD_compressBlock_lazy_extDict_generic()
1369 ip += matchLength; in ZSTD_compressBlock_lazy_extDict_generic()