Lines Matching refs:mlen

660             size_t mlen;
663 mlen = ZSTD_count(ip, match, iLimit);
666 mlen = ZSTD_count_2segments(ip, match, iLimit, dictEnd, prefixStart);
670 if (mlen >= mls /* == 3 > bestLength */) {
672 (U32)mlen);
673 bestLength = mlen;
677 matches[0].len = (U32)mlen;
679 if ( (mlen > sufficient_len) |
680 (ip+mlen == iLimit) ) { /* best possible length */
1016 return sol.litlen + sol.mlen;
1090 opt[0].mlen = 0; /* means is_a_literal */
1107 lastSequence.mlen = maxML;
1122 opt[pos].price = ZSTD_MAX_PRICE; /* mlen, litlen and price will be fixed during forward scanning */
1132 opt[pos].mlen = pos;
1148 { U32 const litlen = (opt[cur-1].mlen == 0) ? opt[cur-1].litlen + 1 : 1;
1158 opt[cur].mlen = 0;
1175 assert(cur >= opt[cur].mlen);
1176 if (opt[cur].mlen != 0) {
1177 U32 const prev = cur - opt[cur].mlen;
1196 { U32 const ll0 = (opt[cur].mlen != 0);
1197 U32 const litlen = (opt[cur].mlen == 0) ? opt[cur].litlen : 0;
1217 lastSequence.mlen = maxML;
1220 cur -= (opt[cur].mlen==0) ? opt[cur].litlen : 0; /* last sequence is actually only literals, fix cur to last match - note : may underflow, in which case, it's first sequence, and it's okay */
1231 U32 mlen;
1233 DEBUGLOG(7, "testing match %u => offCode=%4u, mlen=%2u, llen=%2u",
1236 for (mlen = lastML; mlen >= startML; mlen--) { /* scan downward */
1237 U32 const pos = cur + mlen;
1238 int const price = (int)basePrice + (int)ZSTD_getMatchPrice(offset, mlen, optStatePtr, optLevel);
1242 pos, mlen, ZSTD_fCost(price), ZSTD_fCost(opt[pos].price));
1244 opt[pos].mlen = mlen;
1250 pos, mlen, ZSTD_fCost(price), ZSTD_fCost(opt[pos].price));
1261 assert(opt[0].mlen == 0);
1267 if (lastSequence.mlen != 0) {
1281 DEBUGLOG(6, "last sequence copied into pos=%u (llen=%u,mlen=%u,ofc=%u)",
1282 storeEnd, lastSequence.litlen, lastSequence.mlen, lastSequence.off);
1287 DEBUGLOG(6, "sequence from rPos=%u copied into pos=%u (llen=%u,mlen=%u,ofc=%u)",
1288 seqPos, storeStart, opt[seqPos].litlen, opt[seqPos].mlen, opt[seqPos].off);
1298 U32 const mlen = opt[storePos].mlen;
1300 U32 const advance = llen + mlen;
1301 DEBUGLOG(6, "considering seq starting at %zi, llen=%u, mlen=%u",
1302 anchor - istart, (unsigned)llen, (unsigned)mlen);
1304 if (mlen==0) { /* only literals => must be last "sequence", actually starting a new stream of sequences */
1311 ZSTD_updateStats(optStatePtr, llen, anchor, offCode, mlen);
1312 ZSTD_storeSeq(seqStore, llen, anchor, iend, offCode, mlen);