/kernel/linux/linux-6.6/lib/zstd/compress/ |
H A D | zstd_compress_sequences.c | 57 static unsigned ZSTD_useLowProbCount(size_t const nbSeq) in ZSTD_useLowProbCount() argument 63 return nbSeq >= 2048; in ZSTD_useLowProbCount() 71 size_t const nbSeq, unsigned const FSELog) in ZSTD_NCountCost() 75 const U32 tableLog = FSE_optimalTableLog(FSELog, nbSeq, max); in ZSTD_NCountCost() 76 FORWARD_IF_ERROR(FSE_normalizeCount(norm, tableLog, count, nbSeq, max, ZSTD_useLowProbCount(nbSeq)), ""); in ZSTD_NCountCost() 159 size_t const mostFrequent, size_t nbSeq, unsigned const FSELog, in ZSTD_selectEncodingType() 166 if (mostFrequent == nbSeq) { in ZSTD_selectEncodingType() 168 if (isDefaultAllowed && nbSeq <= 2) { in ZSTD_selectEncodingType() 188 && (nbSeq < staticFse_nbSeq_ma in ZSTD_selectEncodingType() 70 ZSTD_NCountCost(unsigned const* count, unsigned const max, size_t const nbSeq, unsigned const FSELog) ZSTD_NCountCost() argument 157 ZSTD_selectEncodingType( FSE_repeat* repeatMode, unsigned const* count, unsigned const max, size_t const mostFrequent, size_t nbSeq, unsigned const FSELog, FSE_CTable const* prevCTable, short const* defaultNorm, U32 defaultNormLog, ZSTD_defaultPolicy_e const isDefaultAllowed, ZSTD_strategy const strategy) ZSTD_selectEncodingType() argument 243 ZSTD_buildCTable(void* dst, size_t dstCapacity, FSE_CTable* nextCTable, U32 FSELog, symbolEncodingType_e type, unsigned* count, U32 max, const BYTE* codeTable, size_t nbSeq, const S16* defaultNorm, U32 defaultNormLog, U32 defaultMax, const FSE_CTable* prevCTable, size_t prevCTableSize, void* entropyWorkspace, size_t entropyWorkspaceSize) ZSTD_buildCTable() argument 291 ZSTD_encodeSequences_body( void* dst, size_t dstCapacity, FSE_CTable const* CTable_MatchLength, BYTE const* mlCodeTable, FSE_CTable const* CTable_OffsetBits, BYTE const* ofCodeTable, FSE_CTable const* CTable_LitLength, BYTE const* llCodeTable, seqDef const* sequences, size_t nbSeq, int longOffsets) ZSTD_encodeSequences_body() argument 385 ZSTD_encodeSequences_default( void* dst, size_t dstCapacity, FSE_CTable const* CTable_MatchLength, BYTE const* mlCodeTable, FSE_CTable const* CTable_OffsetBits, BYTE const* ofCodeTable, FSE_CTable const* CTable_LitLength, BYTE const* llCodeTable, seqDef const* sequences, size_t nbSeq, int longOffsets) ZSTD_encodeSequences_default() argument 403 ZSTD_encodeSequences_bmi2( void* dst, size_t dstCapacity, FSE_CTable const* CTable_MatchLength, BYTE const* mlCodeTable, FSE_CTable const* CTable_OffsetBits, BYTE const* ofCodeTable, FSE_CTable const* CTable_LitLength, BYTE const* llCodeTable, seqDef const* sequences, size_t nbSeq, int longOffsets) ZSTD_encodeSequences_bmi2() argument 419 ZSTD_encodeSequences( void* dst, size_t dstCapacity, FSE_CTable const* CTable_MatchLength, BYTE const* mlCodeTable, FSE_CTable const* CTable_OffsetBits, BYTE const* ofCodeTable, FSE_CTable const* CTable_LitLength, BYTE const* llCodeTable, seqDef const* sequences, size_t nbSeq, int longOffsets, int bmi2) ZSTD_encodeSequences() argument [all...] |
H A D | zstd_compress_superblock.c | 129 static size_t ZSTD_seqDecompressedSize(seqStore_t const* seqStore, const seqDef* sequences, size_t nbSeq, size_t litSize, int lastSequence) { in ZSTD_seqDecompressedSize() argument 131 const seqDef* const send = sequences + nbSeq; in ZSTD_seqDecompressedSize() 161 const seqDef* sequences, size_t nbSeq, in ZSTD_compressSubBlock_sequences() 173 DEBUGLOG(5, "ZSTD_compressSubBlock_sequences (nbSeq=%zu, writeEntropy=%d, longOffsets=%d)", nbSeq, writeEntropy, longOffsets); in ZSTD_compressSubBlock_sequences() 177 RETURN_ERROR_IF((oend-op) < 3 /*max nbSeq Size*/ + 1 /*seqHead*/, in ZSTD_compressSubBlock_sequences() 179 if (nbSeq < 0x7F) in ZSTD_compressSubBlock_sequences() 180 *op++ = (BYTE)nbSeq; in ZSTD_compressSubBlock_sequences() 181 else if (nbSeq < LONGNBSEQ) in ZSTD_compressSubBlock_sequences() 182 op[0] = (BYTE)((nbSeq>> in ZSTD_compressSubBlock_sequences() 159 ZSTD_compressSubBlock_sequences(const ZSTD_fseCTables_t* fseTables, const ZSTD_fseCTablesMetadata_t* fseMetadata, const seqDef* sequences, size_t nbSeq, const BYTE* llCode, const BYTE* mlCode, const BYTE* ofCode, const ZSTD_CCtx_params* cctxParams, void* dst, size_t dstCapacity, const int bmi2, int writeEntropy, int* entropyWritten) ZSTD_compressSubBlock_sequences() argument 259 ZSTD_compressSubBlock(const ZSTD_entropyCTables_t* entropy, const ZSTD_entropyCTablesMetadata_t* entropyMetadata, const seqDef* sequences, size_t nbSeq, const BYTE* literals, size_t litSize, const BYTE* llCode, const BYTE* mlCode, const BYTE* ofCode, const ZSTD_CCtx_params* cctxParams, void* dst, size_t dstCapacity, const int bmi2, int writeLitEntropy, int writeSeqEntropy, int* litEntropyWritten, int* seqEntropyWritten, U32 lastBlock) ZSTD_compressSubBlock() argument 325 ZSTD_estimateSubBlockSize_symbolType(symbolEncodingType_e type, const BYTE* codeTable, unsigned maxCode, size_t nbSeq, const FSE_CTable* fseCTable, const U8* additionalBits, short const* defaultNorm, U32 defaultNormLog, U32 defaultMax, void* workspace, size_t wkspSize) ZSTD_estimateSubBlockSize_symbolType() argument 360 ZSTD_estimateSubBlockSize_sequences(const BYTE* ofCodeTable, const BYTE* llCodeTable, const BYTE* mlCodeTable, size_t nbSeq, const ZSTD_fseCTables_t* fseTables, const ZSTD_fseCTablesMetadata_t* fseMetadata, void* workspace, size_t wkspSize, int writeEntropy) ZSTD_estimateSubBlockSize_sequences() argument 388 ZSTD_estimateSubBlockSize(const BYTE* literals, size_t litSize, const BYTE* ofCodeTable, const BYTE* llCodeTable, const BYTE* mlCodeTable, size_t nbSeq, const ZSTD_entropyCTables_t* entropy, const ZSTD_entropyCTablesMetadata_t* entropyMetadata, void* workspace, size_t wkspSize, int writeLitEntropy, int writeSeqEntropy) ZSTD_estimateSubBlockSize() argument [all...] |
H A D | zstd_compress_sequences.h | 25 size_t const mostFrequent, size_t nbSeq, unsigned const FSELog, 35 const BYTE* codeTable, size_t nbSeq, 45 seqDef const* sequences, size_t nbSeq, int longOffsets, int bmi2);
|
H A D | zstd_compress.c | 2303 U32 const nbSeq = (U32)(seqStorePtr->sequences - seqStorePtr->sequencesStart); in ZSTD_seqToCodes() local 2305 assert(nbSeq <= seqStorePtr->maxNbSeq); in ZSTD_seqToCodes() 2306 for (u=0; u<nbSeq; u++) { in ZSTD_seqToCodes() 2355 * nbSeq must be greater than 0. 2360 ZSTD_buildSequencesStatistics(seqStore_t* seqStorePtr, size_t nbSeq, in ZSTD_buildSequencesStatistics() argument 2380 assert(nbSeq != 0); /* ZSTD_selectEncodingType() divides by nbSeq */ in ZSTD_buildSequencesStatistics() 2383 size_t const mostFrequent = HIST_countFast_wksp(countWorkspace, &max, llCodeTable, nbSeq, entropyWorkspace, entropyWkspSize); /* can't fail */ in ZSTD_buildSequencesStatistics() 2387 countWorkspace, max, mostFrequent, nbSeq, in ZSTD_buildSequencesStatistics() 2396 countWorkspace, max, llCodeTable, nbSeq, in ZSTD_buildSequencesStatistics() 2498 const size_t nbSeq = seqStorePtr->sequences - seqStorePtr->sequencesStart; ZSTD_entropyCompressSeqStore_internal() local 3090 size_t const nbSeq = seqStorePtr->sequences - seqStorePtr->sequencesStart; ZSTD_buildBlockEntropyStats_sequences() local 3172 ZSTD_estimateBlockSize_symbolType(symbolEncodingType_e type, const BYTE* codeTable, size_t nbSeq, unsigned maxCode, const FSE_CTable* fseCTable, const U8* additionalBits, short const* defaultNorm, U32 defaultNormLog, U32 defaultMax, void* workspace, size_t wkspSize) ZSTD_estimateBlockSize_symbolType() argument 3209 ZSTD_estimateBlockSize_sequences(const BYTE* ofCodeTable, const BYTE* llCodeTable, const BYTE* mlCodeTable, size_t nbSeq, const ZSTD_fseCTables_t* fseTables, const ZSTD_fseCTablesMetadata_t* fseMetadata, void* workspace, size_t wkspSize, int writeEntropy) ZSTD_estimateBlockSize_sequences() argument 3237 ZSTD_estimateBlockSize(const BYTE* literals, size_t litSize, const BYTE* ofCodeTable, const BYTE* llCodeTable, const BYTE* mlCodeTable, size_t nbSeq, const ZSTD_entropyCTables_t* entropy, const ZSTD_entropyCTablesMetadata_t* entropyMetadata, void* workspace, size_t wkspSize, int writeLitEntropy, int writeSeqEntropy) ZSTD_estimateBlockSize() argument 3374 ZSTD_seqStore_resolveOffCodes(repcodes_t* const dRepcodes, repcodes_t* const cRepcodes, seqStore_t* const seqStore, U32 const nbSeq) ZSTD_seqStore_resolveOffCodes() argument 3534 ZSTD_deriveBlockSplits(ZSTD_CCtx* zc, U32 partitions[], U32 nbSeq) ZSTD_deriveBlockSplits() argument 3553 ZSTD_compressBlock_splitBlock_internal(ZSTD_CCtx* zc, void* dst, size_t dstCapacity, const void* src, size_t blockSize, U32 lastBlock, U32 nbSeq) ZSTD_compressBlock_splitBlock_internal() argument 3648 U32 nbSeq; ZSTD_compressBlock_splitBlock() local 4004 ZSTD_referenceExternalSequences(ZSTD_CCtx* cctx, rawSeq* seq, size_t nbSeq) ZSTD_referenceExternalSequences() argument [all...] |
H A D | zstd_compress_internal.h | 1388 size_t ZSTD_referenceExternalSequences(ZSTD_CCtx* cctx, rawSeq* seq, size_t nbSeq);
|
/kernel/linux/linux-6.6/lib/zstd/decompress/ |
H A D | zstd_decompress_block.c | 610 int ddictIsCold, int nbSeq, U32* wksp, size_t wkspSize, in ZSTD_buildSeqTable() 631 if (ddictIsCold && (nbSeq > 24 /* heuristic */)) { in ZSTD_buildSeqTable() 659 int nbSeq; in ZSTD_decodeSeqHeaders() local 666 nbSeq = *ip++; in ZSTD_decodeSeqHeaders() 667 if (!nbSeq) { in ZSTD_decodeSeqHeaders() 672 if (nbSeq > 0x7F) { in ZSTD_decodeSeqHeaders() 673 if (nbSeq == 0xFF) { in ZSTD_decodeSeqHeaders() 675 nbSeq = MEM_readLE16(ip) + LONGNBSEQ; in ZSTD_decodeSeqHeaders() 679 nbSeq = ((nbSeq in ZSTD_decodeSeqHeaders() 605 ZSTD_buildSeqTable(ZSTD_seqSymbol* DTableSpace, const ZSTD_seqSymbol** DTablePtr, symbolEncodingType_e type, unsigned max, U32 maxLog, const void* src, size_t srcSize, const U32* baseValue, const U8* nbAdditionalBits, const ZSTD_seqSymbol* defaultTable, U32 flagRepeatTable, int ddictIsCold, int nbSeq, U32* wksp, size_t wkspSize, int bmi2) ZSTD_buildSeqTable() argument 1322 ZSTD_decompressSequences_bodySplitLitBuffer( ZSTD_DCtx* dctx, void* dst, size_t maxDstSize, const void* seqStart, size_t seqSize, int nbSeq, const ZSTD_longOffset_e isLongOffset, const int frame) global() argument 1539 ZSTD_decompressSequences_body(ZSTD_DCtx* dctx, void* dst, size_t maxDstSize, const void* seqStart, size_t seqSize, int nbSeq, const ZSTD_longOffset_e isLongOffset, const int frame) global() argument 1627 ZSTD_decompressSequences_default(ZSTD_DCtx* dctx, void* dst, size_t maxDstSize, const void* seqStart, size_t seqSize, int nbSeq, const ZSTD_longOffset_e isLongOffset, const int frame) global() argument 1637 ZSTD_decompressSequencesSplitLitBuffer_default(ZSTD_DCtx* dctx, void* dst, size_t maxDstSize, const void* seqStart, size_t seqSize, int nbSeq, const ZSTD_longOffset_e isLongOffset, const int frame) global() argument 1667 ZSTD_decompressSequencesLong_body( ZSTD_DCtx* dctx, void* dst, size_t maxDstSize, const void* seqStart, size_t seqSize, int nbSeq, const ZSTD_longOffset_e isLongOffset, const int frame) global() argument 1834 ZSTD_decompressSequencesLong_default(ZSTD_DCtx* dctx, void* dst, size_t maxDstSize, const void* seqStart, size_t seqSize, int nbSeq, const ZSTD_longOffset_e isLongOffset, const int frame) global() argument 1851 ZSTD_decompressSequences_bmi2(ZSTD_DCtx* dctx, void* dst, size_t maxDstSize, const void* seqStart, size_t seqSize, int nbSeq, const ZSTD_longOffset_e isLongOffset, const int frame) global() argument 1861 ZSTD_decompressSequencesSplitLitBuffer_bmi2(ZSTD_DCtx* dctx, void* dst, size_t maxDstSize, const void* seqStart, size_t seqSize, int nbSeq, const ZSTD_longOffset_e isLongOffset, const int frame) global() argument 1873 ZSTD_decompressSequencesLong_bmi2(ZSTD_DCtx* dctx, void* dst, size_t maxDstSize, const void* seqStart, size_t seqSize, int nbSeq, const ZSTD_longOffset_e isLongOffset, const int frame) global() argument 1894 ZSTD_decompressSequences(ZSTD_DCtx* dctx, void* dst, size_t maxDstSize, const void* seqStart, size_t seqSize, int nbSeq, const ZSTD_longOffset_e isLongOffset, const int frame) global() argument 1908 ZSTD_decompressSequencesSplitLitBuffer(ZSTD_DCtx* dctx, void* dst, size_t maxDstSize, const void* seqStart, size_t seqSize, int nbSeq, const ZSTD_longOffset_e isLongOffset, const int frame) global() argument 1931 ZSTD_decompressSequencesLong(ZSTD_DCtx* dctx, void* dst, size_t maxDstSize, const void* seqStart, size_t seqSize, int nbSeq, const ZSTD_longOffset_e isLongOffset, const int frame) global() argument 2012 int nbSeq; global() local [all...] |
/kernel/linux/linux-5.10/lib/zstd/ |
H A D | compress.c | 571 U32 const nbSeq = (U32)(seqStorePtr->sequences - seqStorePtr->sequencesStart); in ZSTD_seqToCodes() local 573 for (u = 0; u < nbSeq; u++) { in ZSTD_seqToCodes() 601 size_t const nbSeq = seqStorePtr->sequences - seqStorePtr->sequencesStart; in ZSTD_compressSequences_internal() local 630 if ((oend - op) < 3 /*max nbSeq Size*/ + 1 /*seqHead */) in ZSTD_compressSequences_internal() 632 if (nbSeq < 0x7F) in ZSTD_compressSequences_internal() 633 *op++ = (BYTE)nbSeq; in ZSTD_compressSequences_internal() 634 else if (nbSeq < LONGNBSEQ) in ZSTD_compressSequences_internal() 635 op[0] = (BYTE)((nbSeq >> 8) + 0x80), op[1] = (BYTE)nbSeq, op += 2; in ZSTD_compressSequences_internal() 637 op[0] = 0xFF, ZSTD_writeLE16(op + 1, (U16)(nbSeq in ZSTD_compressSequences_internal() [all...] |
H A D | decompress.c | 806 int nbSeq = *ip++; in ZSTD_decodeSeqHeaders() local 807 if (!nbSeq) { in ZSTD_decodeSeqHeaders() 811 if (nbSeq > 0x7F) { in ZSTD_decodeSeqHeaders() 812 if (nbSeq == 0xFF) { in ZSTD_decodeSeqHeaders() 815 nbSeq = ZSTD_readLE16(ip) + LONGNBSEQ, ip += 2; in ZSTD_decodeSeqHeaders() 819 nbSeq = ((nbSeq - 0x80) << 8) + *ip++; in ZSTD_decodeSeqHeaders() 822 *nbSeqPtr = nbSeq; in ZSTD_decodeSeqHeaders() 1105 int nbSeq; in ZSTD_decompressSequences() local 1109 size_t const seqHSize = ZSTD_decodeSeqHeaders(dctx, &nbSeq, i in ZSTD_decompressSequences() 1361 int nbSeq; ZSTD_decompressSequencesLong() local [all...] |