/kernel/linux/linux-6.6/lib/zstd/compress/ |
H A D | zstd_ldm.c | 459 seq->litLength = (U32)(split - backwardMatchLength - anchor); in ZSTD_ldm_generateSequences_internal() 572 sequences->seq[prevSize].litLength += (U32)leftoverSize; in ZSTD_ldm_generateSequences() 587 if (srcSize <= seq->litLength) { in ZSTD_ldm_skipSequences() 589 seq->litLength -= (U32)srcSize; in ZSTD_ldm_skipSequences() 592 srcSize -= seq->litLength; in ZSTD_ldm_skipSequences() 593 seq->litLength = 0; in ZSTD_ldm_skipSequences() 600 seq[1].litLength += seq[0].matchLength; in ZSTD_ldm_skipSequences() 625 if (remaining >= sequence.litLength + sequence.matchLength) { in maybeSplitSequence() 630 if (remaining <= sequence.litLength) { in maybeSplitSequence() 632 } else if (remaining < sequence.litLength in maybeSplitSequence() [all...] |
H A D | zstd_compress_internal.h | 132 U32 litLength; /* Length of literals prior to match */ member 140 stopped. posInSequence <= seq[pos].litLength + seq[pos].matchLength */ 160 unsigned* litLengthFreq; /* table of litLength statistics, of size (MaxLL+1) */ 167 U32 litLengthSum; /* nb of litLength codes */ 457 MEM_STATIC U32 ZSTD_LLcode(U32 litLength) in ZSTD_LLcode() argument 468 return (litLength > 63) ? ZSTD_highbit32(litLength) + LL_deltaCode : LL_Code[litLength]; in ZSTD_LLcode() 589 size_t litLength, const BYTE* literals, const BYTE* litLimit, in ZSTD_storeSeq() 594 BYTE const* const litEnd = literals + litLength; in ZSTD_storeSeq() 588 ZSTD_storeSeq(seqStore_t* seqStorePtr, size_t litLength, const BYTE* literals, const BYTE* litLimit, U32 offBase_minus1, size_t matchLength) ZSTD_storeSeq() argument [all...] |
H A D | zstd_opt.c | 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() 275 /* We can't compute the litLength pric in ZSTD_litLengthPrice() 329 ZSTD_updateStats(optState_t* const optPtr, U32 litLength, const BYTE* literals, U32 offsetCode, U32 matchLength) ZSTD_updateStats() argument [all...] |
H A D | zstd_compress.c | 2307 U32 const llv = sequences[u].litLength; in ZSTD_seqToCodes() 2823 outSeqs[i].litLength = seqStoreSeqs[i].litLength; in ZSTD_copyBlockSequences() 2829 outSeqs[i].litLength += 0x10000; in ZSTD_copyBlockSequences() 2838 if (outSeqs[i].litLength != 0) { in ZSTD_copyBlockSequences() 2853 seqStoreSeqs[i].litLength == 0); in ZSTD_copyBlockSequences() 2854 literalsRead += outSeqs[i].litLength; in ZSTD_copyBlockSequences() 2862 outSeqs[i].litLength = (U32)lastLLSize; in ZSTD_copyBlockSequences() 2894 sequences[in+1].litLength += sequences[in].litLength; in ZSTD_mergeBlockDelimiters() 5619 U32 const litLength = inSeqs[idx].litLength; ZSTD_copySequencesToSeqStoreExplicitBlockDelim() local 5688 U32 litLength = currSeq.litLength; ZSTD_copySequencesToSeqStoreNoBlockDelim() local [all...] |
H A D | zstd_compress_sequences.c | 314 BIT_addBits(&blockStream, sequences[nbSeq-1].litLength, LL_bits[llCodeTable[nbSeq-1]]); in ZSTD_encodeSequences_body() 341 (unsigned)sequences[n].litLength, in ZSTD_encodeSequences_body() 352 BIT_addBits(&blockStream, sequences[n].litLength, llBits); in ZSTD_encodeSequences_body()
|
H A D | zstd_compress_superblock.c | 138 litLengthSum += seqLen.litLength; in ZSTD_seqDecompressedSize() 467 litSize += ZSTD_getSequenceLength(seqStorePtr, sequence).litLength; in ZSTD_compressSubBlock_multi() 542 ZSTD_updateRep(rep.rep, seq->offBase - 1, ZSTD_getSequenceLength(seqStorePtr, seq).litLength == 0); in ZSTD_compressSubBlock_multi()
|
H A D | zstd_lazy.c | 1672 { size_t const litLength = (size_t)(start - anchor); in ZSTD_compressBlock_lazy_generic() local 1673 ZSTD_storeSeq(seqStore, litLength, anchor, iend, (U32)offcode, matchLength); in ZSTD_compressBlock_lazy_generic() 2014 { size_t const litLength = (size_t)(start - anchor); in ZSTD_compressBlock_lazy_extDict_generic() local 2015 ZSTD_storeSeq(seqStore, litLength, anchor, iend, (U32)offcode, matchLength); in ZSTD_compressBlock_lazy_extDict_generic()
|
/kernel/linux/linux-5.10/lib/lz4/ |
H A D | lz4_compress.c | 302 unsigned const int litLength = (unsigned int)(ip - anchor); in LZ4_compress_generic() local 308 (unlikely(op + litLength + in LZ4_compress_generic() 310 (litLength / 255) > olimit))) in LZ4_compress_generic() 313 if (litLength >= RUN_MASK) { in LZ4_compress_generic() 314 int len = (int)litLength - RUN_MASK; in LZ4_compress_generic() 322 *token = (BYTE)(litLength << ML_BITS); in LZ4_compress_generic() 325 LZ4_wildCopy(op, anchor, op + litLength); in LZ4_compress_generic() 326 op += litLength; in LZ4_compress_generic() 612 unsigned int litLength = (unsigned int)(ip - anchor); in LZ4_compress_destSize_generic() local 615 if (op + ((litLength in LZ4_compress_destSize_generic() [all...] |
/kernel/linux/linux-6.6/lib/lz4/ |
H A D | lz4_compress.c | 302 unsigned const int litLength = (unsigned int)(ip - anchor); in LZ4_compress_generic() local 308 (unlikely(op + litLength + in LZ4_compress_generic() 310 (litLength / 255) > olimit))) in LZ4_compress_generic() 313 if (litLength >= RUN_MASK) { in LZ4_compress_generic() 314 int len = (int)litLength - RUN_MASK; in LZ4_compress_generic() 322 *token = (BYTE)(litLength << ML_BITS); in LZ4_compress_generic() 325 LZ4_wildCopy(op, anchor, op + litLength); in LZ4_compress_generic() 326 op += litLength; in LZ4_compress_generic() 612 unsigned int litLength = (unsigned int)(ip - anchor); in LZ4_compress_destSize_generic() local 615 if (op + ((litLength in LZ4_compress_destSize_generic() [all...] |
/kernel/linux/linux-5.10/lib/zstd/ |
H A D | zstd_opt.h | 101 FORCE_INLINE U32 ZSTD_getLiteralPrice(seqStore_t *ssPtr, U32 litLength, const BYTE *literals) in ZSTD_getLiteralPrice() argument 106 return ZSTD_highbit32((U32)litLength + 1) + (litLength * 6); in ZSTD_getLiteralPrice() 108 if (litLength == 0) in ZSTD_getLiteralPrice() 113 U32 const additional = litLength - ssPtr->cachedLitLength; in ZSTD_getLiteralPrice() 119 ssPtr->cachedLitLength = litLength; in ZSTD_getLiteralPrice() 121 price = litLength * ssPtr->log2litSum; in ZSTD_getLiteralPrice() 122 for (u = 0; u < litLength; u++) in ZSTD_getLiteralPrice() 125 if (litLength >= 12) { in ZSTD_getLiteralPrice() 128 ssPtr->cachedLitLength = litLength; in ZSTD_getLiteralPrice() 142 ZSTD_getPrice(seqStore_t *seqStorePtr, U32 litLength, const BYTE *literals, U32 offset, U32 matchLength, const int ultra) ZSTD_getPrice() argument 165 ZSTD_updatePrice(seqStore_t *seqStorePtr, U32 litLength, const BYTE *literals, U32 offset, U32 matchLength) ZSTD_updatePrice() argument 441 U32 u, mlen, best_mlen, best_off, litLength; ZSTD_compressBlock_opt_generic() local 739 U32 u, mlen, best_mlen, best_off, litLength; ZSTD_compressBlock_opt_extDict_generic() local [all...] |
H A D | decompress.c | 862 size_t litLength; member 883 BYTE *const oLitEnd = op + sequence.litLength; in ZSTD_execSequenceLast7() 884 size_t const sequenceLength = sequence.litLength + sequence.matchLength; in ZSTD_execSequenceLast7() 887 const BYTE *const iLitEnd = *litPtr + sequence.litLength; in ZSTD_execSequenceLast7() 990 seq.litLength = LL_base[llCode] + ((llCode > 15) ? BIT_readBitsFast(&seqState->DStream, llBits) : 0); /* <= 16 bits */ in ZSTD_decodeSequence() 1010 BYTE *const oLitEnd = op + sequence.litLength; in ZSTD_execSequence() 1011 size_t const sequenceLength = sequence.litLength + sequence.matchLength; in ZSTD_execSequence() 1014 const BYTE *const iLitEnd = *litPtr + sequence.litLength; in ZSTD_execSequence() 1027 if (sequence.litLength > 8) in ZSTD_execSequence() 1029 sequence.litLength in ZSTD_execSequence() [all...] |
H A D | zstd_internal.h | 184 U16 litLength; member
|
H A D | compress.c | 574 U32 const llv = sequences[u].litLength; in ZSTD_seqToCodes() 762 BIT_addBits(&blockStream, sequences[nbSeq - 1].litLength, LL_bits[llCodeTable[nbSeq - 1]]); in ZSTD_compressSequences_internal() 798 BIT_addBits(&blockStream, sequences[n].litLength, llBits); in ZSTD_compressSequences_internal() 861 ZSTD_STATIC void ZSTD_storeSeq(seqStore_t *seqStorePtr, size_t litLength, const void *literals, U32 offsetCode, size_t matchCode) in ZSTD_storeSeq() argument 864 ZSTD_wildcopy(seqStorePtr->lit, literals, litLength); in ZSTD_storeSeq() 865 seqStorePtr->lit += litLength; in ZSTD_storeSeq() 868 if (litLength > 0xFFFF) { in ZSTD_storeSeq() 872 seqStorePtr->sequences[0].litLength = (U16)litLength; in ZSTD_storeSeq() 2018 size_t const litLength in ZSTD_compressBlock_lazy_generic() local 2212 size_t const litLength = start - anchor; ZSTD_compressBlock_lazy_extDict_generic() local [all...] |
/kernel/linux/linux-6.6/lib/zstd/decompress/ |
H A D | zstd_decompress_block.c | 734 size_t litLength; member 866 BYTE* const oLitEnd = op + sequence.litLength; in ZSTD_execSequenceEnd() 867 size_t const sequenceLength = sequence.litLength + sequence.matchLength; in ZSTD_execSequenceEnd() 868 const BYTE* const iLitEnd = *litPtr + sequence.litLength; in ZSTD_execSequenceEnd() 874 RETURN_ERROR_IF(sequence.litLength > (size_t)(litLimit - *litPtr), corruption_detected, "try to read beyond literal buffer"); in ZSTD_execSequenceEnd() 879 ZSTD_safecopy(op, oend_w, *litPtr, sequence.litLength, ZSTD_no_overlap); in ZSTD_execSequenceEnd() 913 BYTE* const oLitEnd = op + sequence.litLength; in ZSTD_execSequenceEndSplitLitBuffer() 914 size_t const sequenceLength = sequence.litLength + sequence.matchLength; in ZSTD_execSequenceEndSplitLitBuffer() 915 const BYTE* const iLitEnd = *litPtr + sequence.litLength; in ZSTD_execSequenceEndSplitLitBuffer() 921 RETURN_ERROR_IF(sequence.litLength > (size_ in ZSTD_execSequenceEndSplitLitBuffer() [all...] |
/kernel/linux/linux-6.6/lib/zstd/common/ |
H A D | zstd_internal.h | 278 U16 litLength; member 282 /* Controls whether seqStore has a single "long" litLength or matchLength. See seqStore_t. */ 300 /* longLengthPos and longLengthType to allow us to represent either a single litLength or matchLength 302 * the existing value of the litLength or matchLength by 0x10000. 309 U32 litLength; member 320 seqLen.litLength = seq->litLength; in ZSTD_getSequenceLength() 324 seqLen.litLength += 0xFFFF; in ZSTD_getSequenceLength()
|
/kernel/linux/linux-6.6/include/linux/ |
H A D | zstd_lib.h | 1162 * literals in the block of litLength size. 1165 unsigned int litLength; /* Literal length of the sequence. */ member 1168 /* Note: Users of this API may provide a sequence with matchLength == litLength == offset == 0. 1180 * If litLength != 0: 1184 * If litLength == 0: 1362 * with offset == 0, matchLength == 0, and litLength == length of last literals. 1363 * litLength may be == 0, and if so, then the sequence of (of: 0 ml: 0 ll: 0)
|