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