Lines Matching refs:len

472 #define GetLenToPosState(len) (((len) < kNumLenToPosStates + 1) ? (len) - 2 : kNumLenToPosStates - 1)
905 static UInt32 GetRepPrice(CLzmaEnc *p, UInt32 repIndex, UInt32 len, UInt32 state, UInt32 posState)
907 return p->repLenEnc.prices[posState][len - LZMA_MATCH_LEN_MIN] +
951 UInt32 numAvail, mainLen, numPairs, repMaxIndex, i, posState, lenEnd, len, cur;
1065 len = lenEnd;
1067 p->opt[len--].price = kInfinityPrice;
1068 while (len >= 2);
1094 len = ((repLens[0] >= 2) ? repLens[0] + 1 : 2);
1095 if (len <= mainLen)
1098 while (len > matches[offs])
1100 for (; ; len++)
1105 UInt32 curAndLenPrice = normalMatchPrice + p->lenEnc.prices[posState][len - LZMA_MATCH_LEN_MIN];
1106 UInt32 lenToPosState = GetLenToPosState(len);
1115 opt = &p->opt[len];
1123 if (len == matches[offs])
1534 UInt32 len;
1538 for (len = 2; len < numAvail && data[len] == data2[len]; len++);
1539 if (len >= p->numFastBytes)
1542 MovePos(p, len - 1);
1543 return len;
1545 if (len > repLen)
1548 repLen = len;
1603 UInt32 len, limit;
1608 for (len = 2; len < limit && data[len] == data2[len]; len++);
1609 if (len >= limit)
1619 UInt32 len;
1623 len = LZMA_MATCH_LEN_MIN;
1624 LenEnc_Encode2(&p->lenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices);
1625 RcTree_Encode(&p->rc, p->posSlotEncoder[GetLenToPosState(len)], kNumPosSlotBits, (1 << kNumPosSlotBits) - 1);
1788 UInt32 pos, len, posState;
1791 len = GetOptimumFast(p, &pos);
1793 len = GetOptimum(p, nowPos32, &pos);
1796 printf("\n pos = %4X, len = %d pos = %d", nowPos32, len, pos);
1800 if (len == 1 && pos == (UInt32)-1)
1825 RangeEnc_EncodeBit(&p->rc, &p->isRep0Long[p->state][posState], ((len == 1) ? 0 : 1));
1844 if (len == 1)
1848 LenEnc_Encode2(&p->repLenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices);
1857 LenEnc_Encode2(&p->lenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices);
1860 RcTree_Encode(&p->rc, p->posSlotEncoder[GetLenToPosState(len)], kNumPosSlotBits, posSlot);
1884 p->additionalOffset -= len;
1885 nowPos32 += len;