Lines Matching refs:last_match_pos
1374 int cur, last_match_pos = 0;
1417 last_match_pos = firstMatch.len;
1420 opt[last_match_pos+addLit].mlen = 1; /* literal */
1421 opt[last_match_pos+addLit].off = 0;
1422 opt[last_match_pos+addLit].litlen = addLit;
1423 opt[last_match_pos+addLit].price = opt[last_match_pos].price + LZ4HC_literalsPrice(addLit);
1425 last_match_pos+addLit, opt[last_match_pos+addLit].price, addLit);
1429 for (cur = 1; cur < last_match_pos; cur++) {
1452 newMatch = LZ4HC_FindLongerMatch(ctx, curPtr, matchlimit, last_match_pos - cur, nbSearches, dict, favorDecSpeed);
1460 last_match_pos = cur + 1;
1489 DEBUGLOG(7, "testing price rPos %i (last_match_pos=%i)",
1490 pos, last_match_pos);
1501 if (pos > last_match_pos+TRAILING_LITERALS
1507 && (last_match_pos < pos) )
1508 last_match_pos = pos;
1517 opt[last_match_pos+addLit].mlen = 1; /* literal */
1518 opt[last_match_pos+addLit].off = 0;
1519 opt[last_match_pos+addLit].litlen = addLit;
1520 opt[last_match_pos+addLit].price = opt[last_match_pos].price + LZ4HC_literalsPrice(addLit);
1521 DEBUGLOG(7, "rPos:%3i => price:%3i (litlen=%i)", last_match_pos+addLit, opt[last_match_pos+addLit].price, addLit);
1523 } /* for (cur = 1; cur <= last_match_pos; cur++) */
1525 assert(last_match_pos < LZ4_OPT_NUM + TRAILING_LITERALS);
1526 best_mlen = opt[last_match_pos].mlen;
1527 best_off = opt[last_match_pos].off;
1528 cur = last_match_pos - best_mlen;
1530 encode: /* cur, last_match_pos, best_mlen, best_off must be set */
1532 assert(last_match_pos >= 1); /* == 1 when only one candidate */
1533 DEBUGLOG(6, "reverse traversal, looking for shortest path (last_match_pos=%i)", last_match_pos);
1552 while (rPos < last_match_pos) {