Lines Matching refs:mlen

206 		opt[pos].mlen = mlen_;                            \
441 U32 u, mlen, best_mlen, best_off, litLength;
453 mlen = (U32)ZSTD_count(ip + minMatch, ip + minMatch - repCur, iend) + minMatch;
454 if (mlen > sufficient_len || mlen >= ZSTD_OPT_NUM) {
455 best_mlen = mlen;
463 price = ZSTD_getPrice(seqStorePtr, litlen, anchor, best_off, mlen - MINMATCH, ultra);
464 if (mlen > last_pos || price < opt[mlen].price)
465 SET_PRICE(mlen, mlen, i, litlen, price); /* note : macro modifies last_pos */
466 mlen--;
467 } while (mlen >= minMatch);
490 mlen = (u > 0) ? matches[u - 1].len + 1 : best_mlen;
492 while (mlen <= best_mlen) {
493 price = ZSTD_getPrice(seqStorePtr, litlen, anchor, matches[u].off - 1, mlen - MINMATCH, ultra);
494 if (mlen > last_pos || price < opt[mlen].price)
495 SET_PRICE(mlen, mlen, matches[u].off, litlen, price); /* note : macro modifies last_pos */
496 mlen++;
511 opt[0].mlen = 1;
518 if (opt[cur - 1].mlen == 1) {
538 mlen = opt[cur].mlen;
540 opt[cur].rep[2] = opt[cur - mlen].rep[1];
541 opt[cur].rep[1] = opt[cur - mlen].rep[0];
544 opt[cur].rep[2] = (opt[cur].off > 1) ? opt[cur - mlen].rep[1] : opt[cur - mlen].rep[2];
545 opt[cur].rep[1] = (opt[cur].off > 0) ? opt[cur - mlen].rep[0] : opt[cur - mlen].rep[1];
547 ((opt[cur].off == ZSTD_REP_MOVE_OPT) && (mlen != 1)) ? (opt[cur - mlen].rep[0] - 1) : (opt[cur - mlen].rep[opt[cur].off]);
552 U32 i, last_i = ZSTD_REP_CHECK + (mlen != 1);
553 for (i = (opt[cur].mlen != 1); i < last_i; i++) { /* check rep */
557 mlen = (U32)ZSTD_count(inr + minMatch, inr + minMatch - repCur, iend) + minMatch;
559 if (mlen > sufficient_len || cur + mlen >= ZSTD_OPT_NUM) {
560 best_mlen = mlen;
566 best_off = i - (opt[cur].mlen != 1);
567 if (mlen > best_mlen)
568 best_mlen = mlen;
571 if (opt[cur].mlen == 1) {
575 best_off, mlen - MINMATCH, ultra);
577 price = ZSTD_getPrice(seqStorePtr, litlen, anchor, best_off, mlen - MINMATCH, ultra);
580 price = opt[cur].price + ZSTD_getPrice(seqStorePtr, 0, NULL, best_off, mlen - MINMATCH, ultra);
583 if (cur + mlen > last_pos || price <= opt[cur + mlen].price)
584 SET_PRICE(cur + mlen, mlen, i, litlen, price);
585 mlen--;
586 } while (mlen >= minMatch);
602 mlen = (u > 0) ? matches[u - 1].len + 1 : best_mlen;
605 while (mlen <= best_mlen) {
606 if (opt[cur].mlen == 1) {
610 matches[u].off - 1, mlen - MINMATCH, ultra);
612 price = ZSTD_getPrice(seqStorePtr, litlen, anchor, matches[u].off - 1, mlen - MINMATCH, ultra);
615 price = opt[cur].price + ZSTD_getPrice(seqStorePtr, 0, NULL, matches[u].off - 1, mlen - MINMATCH, ultra);
618 if (cur + mlen > last_pos || (price < opt[cur + mlen].price))
619 SET_PRICE(cur + mlen, mlen, matches[u].off, litlen, price);
621 mlen++;
626 best_mlen = opt[last_pos].mlen;
632 opt[0].mlen = 1;
635 mlen = opt[cur].mlen;
637 opt[cur].mlen = best_mlen;
639 best_mlen = mlen;
641 if (mlen > cur)
643 cur -= mlen;
647 u += opt[u].mlen;
651 mlen = opt[cur].mlen;
652 if (mlen == 1) {
658 cur += mlen;
678 ZSTD_updatePrice(seqStorePtr, litLength, anchor, offset, mlen - MINMATCH);
679 ZSTD_storeSeq(seqStorePtr, litLength, anchor, offset, mlen - MINMATCH);
680 anchor = ip = ip + mlen;
739 U32 u, mlen, best_mlen, best_off, litLength;
758 mlen = (U32)ZSTD_count_2segments(ip + minMatch, repMatch + minMatch, iend, repEnd, prefixStart) + minMatch;
760 if (mlen > sufficient_len || mlen >= ZSTD_OPT_NUM) {
761 best_mlen = mlen;
771 price = ZSTD_getPrice(seqStorePtr, litlen, anchor, best_off, mlen - MINMATCH, ultra);
772 if (mlen > last_pos || price < opt[mlen].price)
773 SET_PRICE(mlen, mlen, i, litlen, price); /* note : macro modifies last_pos */
774 mlen--;
775 } while (mlen >= minMatch);
792 opt[0].mlen = 1;
806 mlen = (u > 0) ? matches[u - 1].len + 1 : best_mlen;
809 while (mlen <= best_mlen) {
810 price = ZSTD_getPrice(seqStorePtr, litlen, anchor, matches[u].off - 1, mlen - MINMATCH, ultra);
811 if (mlen > last_pos || price < opt[mlen].price)
812 SET_PRICE(mlen, mlen, matches[u].off, litlen, price);
813 mlen++;
826 if (opt[cur - 1].mlen == 1) {
846 mlen = opt[cur].mlen;
848 opt[cur].rep[2] = opt[cur - mlen].rep[1];
849 opt[cur].rep[1] = opt[cur - mlen].rep[0];
852 opt[cur].rep[2] = (opt[cur].off > 1) ? opt[cur - mlen].rep[1] : opt[cur - mlen].rep[2];
853 opt[cur].rep[1] = (opt[cur].off > 0) ? opt[cur - mlen].rep[0] : opt[cur - mlen].rep[1];
855 ((opt[cur].off == ZSTD_REP_MOVE_OPT) && (mlen != 1)) ? (opt[cur - mlen].rep[0] - 1) : (opt[cur - mlen].rep[opt[cur].off]);
860 U32 i, last_i = ZSTD_REP_CHECK + (mlen != 1);
861 for (i = (mlen != 1); i < last_i; i++) {
871 mlen = (U32)ZSTD_count_2segments(inr + minMatch, repMatch + minMatch, iend, repEnd, prefixStart) + minMatch;
873 if (mlen > sufficient_len || cur + mlen >= ZSTD_OPT_NUM) {
874 best_mlen = mlen;
880 best_off = i - (opt[cur].mlen != 1);
881 if (mlen > best_mlen)
882 best_mlen = mlen;
885 if (opt[cur].mlen == 1) {
889 best_off, mlen - MINMATCH, ultra);
891 price = ZSTD_getPrice(seqStorePtr, litlen, anchor, best_off, mlen - MINMATCH, ultra);
894 price = opt[cur].price + ZSTD_getPrice(seqStorePtr, 0, NULL, best_off, mlen - MINMATCH, ultra);
897 if (cur + mlen > last_pos || price <= opt[cur + mlen].price)
898 SET_PRICE(cur + mlen, mlen, i, litlen, price);
899 mlen--;
900 } while (mlen >= minMatch);
916 mlen = (u > 0) ? matches[u - 1].len + 1 : best_mlen;
919 while (mlen <= best_mlen) {
920 if (opt[cur].mlen == 1) {
924 matches[u].off - 1, mlen - MINMATCH, ultra);
926 price = ZSTD_getPrice(seqStorePtr, litlen, anchor, matches[u].off - 1, mlen - MINMATCH, ultra);
929 price = opt[cur].price + ZSTD_getPrice(seqStorePtr, 0, NULL, matches[u].off - 1, mlen - MINMATCH, ultra);
932 if (cur + mlen > last_pos || (price < opt[cur + mlen].price))
933 SET_PRICE(cur + mlen, mlen, matches[u].off, litlen, price);
935 mlen++;
940 best_mlen = opt[last_pos].mlen;
946 opt[0].mlen = 1;
949 mlen = opt[cur].mlen;
951 opt[cur].mlen = best_mlen;
953 best_mlen = mlen;
955 if (mlen > cur)
957 cur -= mlen;
961 u += opt[u].mlen;
965 mlen = opt[cur].mlen;
966 if (mlen == 1) {
972 cur += mlen;
993 ZSTD_updatePrice(seqStorePtr, litLength, anchor, offset, mlen - MINMATCH);
994 ZSTD_storeSeq(seqStorePtr, litLength, anchor, offset, mlen - MINMATCH);
995 anchor = ip = ip + mlen;