Lines Matching refs:litLength
267 static U32 ZSTD_rawLiteralsCost(const BYTE* const literals, U32 const litLength, in ZSTD_rawLiteralsCost() argument
271 DEBUGLOG(8, "ZSTD_rawLiteralsCost (%u literals)", litLength); in ZSTD_rawLiteralsCost()
272 if (litLength == 0) return 0; in ZSTD_rawLiteralsCost()
275 return (litLength << 3) * BITCOST_MULTIPLIER; /* Uncompressed - 8 bytes per literal. */ in ZSTD_rawLiteralsCost()
278 return (litLength*6) * BITCOST_MULTIPLIER; /* 6 bit per literal - no statistic used */ in ZSTD_rawLiteralsCost()
281 { U32 price = optPtr->litSumBasePrice * litLength; in ZSTD_rawLiteralsCost()
285 for (u=0; u < litLength; u++) { in ZSTD_rawLiteralsCost()
296 static U32 ZSTD_litLengthPrice(U32 const litLength, const optState_t* const optPtr, int optLevel) in ZSTD_litLengthPrice() argument
298 assert(litLength <= ZSTD_BLOCKSIZE_MAX); in ZSTD_litLengthPrice()
300 return WEIGHT(litLength, optLevel); in ZSTD_litLengthPrice()
307 if (litLength == ZSTD_BLOCKSIZE_MAX) in ZSTD_litLengthPrice()
311 { U32 const llCode = ZSTD_LLcode(litLength); in ZSTD_litLengthPrice()
358 U32 litLength, const BYTE* literals, in ZSTD_updateStats() argument
364 for (u=0; u < litLength; u++) in ZSTD_updateStats()
366 optPtr->litSum += litLength*ZSTD_LITFREQ_ADD; in ZSTD_updateStats()
370 { U32 const llCode = ZSTD_LLcode(litLength); in ZSTD_updateStats()
924 if (currPos >= currSeq.litLength + currSeq.matchLength) { in ZSTD_optLdm_skipRawSeqStoreBytes()
925 currPos -= currSeq.litLength + currSeq.matchLength; in ZSTD_optLdm_skipRawSeqStoreBytes()
959 assert(optLdm->seqStore.posInSequence <= currSeq.litLength + currSeq.matchLength); in ZSTD_opt_getNextMatchAndUpdateSeqStore()
961 literalsBytesRemaining = (optLdm->seqStore.posInSequence < currSeq.litLength) ? in ZSTD_opt_getNextMatchAndUpdateSeqStore()
962 currSeq.litLength - (U32)optLdm->seqStore.posInSequence : in ZSTD_opt_getNextMatchAndUpdateSeqStore()
965 currSeq.matchLength - ((U32)optLdm->seqStore.posInSequence - currSeq.litLength) : in ZSTD_opt_getNextMatchAndUpdateSeqStore()