Lines Matching refs:ml

577     int   ml0, ml, ml2, ml3;
593 ml = LZ4HC_InsertAndFindBestMatch(ctx, ip, matchlimit, &ref, maxNbAttempts, patternAnalysis, dict);
594 if (ml<MINMATCH) { ip++; continue; }
597 start0 = ip; ref0 = ref; ml0 = ml;
600 if (ip+ml <= mflimit) {
602 ip + ml - 2, ip + 0, matchlimit, ml, &ref2, &start2,
605 ml2 = ml;
608 if (ml2 == ml) { /* No better match => encode ML1 */
610 if (LZ4HC_encodeSequence(UPDATABLE(ip, op, anchor), ml, ref, limit, oend)) goto _dest_overflow;
616 ip = start0; ref = ref0; ml = ml0; /* restore initial ML1 */
621 ml = ml2;
633 int new_ml = ml;
643 /* Now, we have start2 = ip+new_ml, with new_ml = min(ml, OPTIMAL_ML=18) */
654 /* ip & ref are known; Now for ml */
655 if (start2 < ip+ml) ml = (int)(start2 - ip);
658 if (LZ4HC_encodeSequence(UPDATABLE(ip, op, anchor), ml, ref, limit, oend)) goto _dest_overflow;
662 ml = ml2;
669 if (start3 < ip+ml+3) { /* Not enough space for match 2 : remove it */
670 if (start3 >= (ip+ml)) { /* can write Seq1 immediately ==> Seq2 is removed, so Seq3 becomes Seq1 */
671 if (start2 < ip+ml) {
672 int correction = (int)(ip+ml - start2);
684 if (LZ4HC_encodeSequence(UPDATABLE(ip, op, anchor), ml, ref, limit, oend)) goto _dest_overflow;
687 ml = ml3;
704 * ip & ref are known; Now decide ml.
706 if (start2 < ip+ml) {
709 if (ml > OPTIMAL_ML) ml = OPTIMAL_ML;
710 if (ip + ml > start2 + ml2 - MINMATCH) ml = (int)(start2 - ip) + ml2 - MINMATCH;
711 correction = ml - (int)(start2 - ip);
718 ml = (int)(start2 - ip);
722 if (LZ4HC_encodeSequence(UPDATABLE(ip, op, anchor), ml, ref, limit, oend)) goto _dest_overflow;
725 ip = start2; ref = ref2; ml = ml2;
768 /* Assumption : ip, anchor, ml and ref must be set correctly */
779 assert(maxMlSize < INT_MAX); assert(ml >= 0);
780 if ((size_t)ml > maxMlSize) ml = (int)maxMlSize;
781 if ((oend + LASTLITERALS) - (op + ll_totalCost + 2) - 1 + ml >= MFLIMIT) {
782 LZ4HC_encodeSequence(UPDATABLE(ip, op, anchor), ml, ref, notLimited, oend);
1481 int ml = MINMATCH;
1484 for ( ; ml <= matchML ; ml++) {
1485 int const pos = cur + ml;
1494 + LZ4HC_sequencePrice(ll, ml);
1497 price = opt[cur].price + LZ4HC_sequencePrice(0, ml);
1504 pos, price, ml);
1506 if ( (ml == matchML) /* last pos of last match */
1509 opt[pos].mlen = ml;
1553 int const ml = opt[rPos].mlen;
1555 if (ml == 1) { ip++; rPos++; continue; } /* literal; note: can end up with several literals, in which case, skip them */
1556 rPos += ml;
1557 assert(ml >= MINMATCH);
1560 if ( LZ4HC_encodeSequence(UPDATABLE(ip, op, anchor), ml, ip - offset, limit, oend) ) { /* updates ip, op and anchor */
1561 ovml = ml;
1619 DEBUGLOG(6, "Space to end : %i + ml (%i)", (int)((oend + LASTLITERALS) - (op + ll_totalCost + 2) - 1), ovml);