Lines Matching refs:litLength
215 static U32 ZSTD_rawLiteralsCost(const BYTE* const literals, U32 const litLength, in ZSTD_rawLiteralsCost() argument
219 if (litLength == 0) return 0; in ZSTD_rawLiteralsCost()
222 return (litLength << 3) * BITCOST_MULTIPLIER; /* Uncompressed - 8 bytes per literal. */ in ZSTD_rawLiteralsCost()
225 return (litLength*6) * BITCOST_MULTIPLIER; /* 6 bit per literal - no statistic used */ in ZSTD_rawLiteralsCost()
228 { U32 price = litLength * optPtr->litSumBasePrice; in ZSTD_rawLiteralsCost()
230 for (u=0; u < litLength; u++) { in ZSTD_rawLiteralsCost()
240 static U32 ZSTD_litLengthPrice(U32 const litLength, const optState_t* const optPtr, int optLevel) in ZSTD_litLengthPrice() argument
242 if (optPtr->priceType == zop_predef) return WEIGHT(litLength, optLevel); in ZSTD_litLengthPrice()
245 { U32 const llCode = ZSTD_LLcode(litLength); in ZSTD_litLengthPrice()
289 U32 litLength, const BYTE* literals, in ZSTD_updateStats() argument
295 for (u=0; u < litLength; u++) in ZSTD_updateStats()
297 optPtr->litSum += litLength*ZSTD_LITFREQ_ADD; in ZSTD_updateStats()
301 { U32 const llCode = ZSTD_LLcode(litLength); in ZSTD_updateStats()
786 if (currPos >= currSeq.litLength + currSeq.matchLength) { in ZSTD_optLdm_skipRawSeqStoreBytes()
787 currPos -= currSeq.litLength + currSeq.matchLength; in ZSTD_optLdm_skipRawSeqStoreBytes()
819 assert(optLdm->seqStore.posInSequence <= currSeq.litLength + currSeq.matchLength); in ZSTD_opt_getNextMatchAndUpdateSeqStore()
821 literalsBytesRemaining = (optLdm->seqStore.posInSequence < currSeq.litLength) ? in ZSTD_opt_getNextMatchAndUpdateSeqStore()
822 currSeq.litLength - (U32)optLdm->seqStore.posInSequence : in ZSTD_opt_getNextMatchAndUpdateSeqStore()
825 currSeq.matchLength - ((U32)optLdm->seqStore.posInSequence - currSeq.litLength) : in ZSTD_opt_getNextMatchAndUpdateSeqStore()