Lines Matching refs:litLength
245 static U32 ZSTD_rawLiteralsCost(const BYTE* const literals, U32 const litLength,
249 if (litLength == 0) return 0;
252 return (litLength << 3) * BITCOST_MULTIPLIER; /* Uncompressed - 8 bytes per literal. */
255 return (litLength*6) * BITCOST_MULTIPLIER; /* 6 bit per literal - no statistic used */
258 { U32 price = litLength * optPtr->litSumBasePrice;
260 for (u=0; u < litLength; u++) {
270 static U32 ZSTD_litLengthPrice(U32 const litLength, const optState_t* const optPtr, int optLevel)
272 assert(litLength <= ZSTD_BLOCKSIZE_MAX);
274 return WEIGHT(litLength, optLevel);
275 /* We can't compute the litLength price for sizes >= ZSTD_BLOCKSIZE_MAX
280 if (litLength == ZSTD_BLOCKSIZE_MAX)
284 { U32 const llCode = ZSTD_LLcode(litLength);
330 U32 litLength, const BYTE* literals,
336 for (u=0; u < litLength; u++)
338 optPtr->litSum += litLength*ZSTD_LITFREQ_ADD;
342 { U32 const llCode = ZSTD_LLcode(litLength);
886 if (currPos >= currSeq.litLength + currSeq.matchLength) {
887 currPos -= currSeq.litLength + currSeq.matchLength;
918 /* Calculate appropriate bytes left in matchLength and litLength
921 assert(optLdm->seqStore.posInSequence <= currSeq.litLength + currSeq.matchLength);
923 literalsBytesRemaining = (optLdm->seqStore.posInSequence < currSeq.litLength) ?
924 currSeq.litLength - (U32)optLdm->seqStore.posInSequence :
927 currSeq.matchLength - ((U32)optLdm->seqStore.posInSequence - currSeq.litLength) :