/linux-6.6.21/lib/zstd/compress/ |
D | zstd_compress_literals.c | 16 size_t ZSTD_noCompressLiterals (void* dst, size_t dstCapacity, const void* src, size_t srcSize) in ZSTD_noCompressLiterals() argument 19 U32 const flSize = 1 + (srcSize>31) + (srcSize>4095); in ZSTD_noCompressLiterals() 21 RETURN_ERROR_IF(srcSize + flSize > dstCapacity, dstSize_tooSmall, ""); in ZSTD_noCompressLiterals() 26 ostart[0] = (BYTE)((U32)set_basic + (srcSize<<3)); in ZSTD_noCompressLiterals() 29 MEM_writeLE16(ostart, (U16)((U32)set_basic + (1<<2) + (srcSize<<4))); in ZSTD_noCompressLiterals() 32 MEM_writeLE32(ostart, (U32)((U32)set_basic + (3<<2) + (srcSize<<4))); in ZSTD_noCompressLiterals() 38 ZSTD_memcpy(ostart + flSize, src, srcSize); in ZSTD_noCompressLiterals() 39 DEBUGLOG(5, "Raw literals: %u -> %u", (U32)srcSize, (U32)(srcSize + flSize)); in ZSTD_noCompressLiterals() 40 return srcSize + flSize; in ZSTD_noCompressLiterals() 43 …ze_t ZSTD_compressRleLiteralsBlock (void* dst, size_t dstCapacity, const void* src, size_t srcSize) in ZSTD_compressRleLiteralsBlock() argument [all …]
|
D | zstd_lazy.h | 34 void const* src, size_t srcSize); 37 void const* src, size_t srcSize); 40 void const* src, size_t srcSize); 43 void const* src, size_t srcSize); 46 void const* src, size_t srcSize); 49 void const* src, size_t srcSize); 52 void const* src, size_t srcSize); 56 void const* src, size_t srcSize); 59 void const* src, size_t srcSize); 62 void const* src, size_t srcSize); [all …]
|
D | huf_compress.c | 44 unsigned HUF_optimalTableLog(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue) in HUF_optimalTableLog() argument 46 return FSE_optimalTableLog_internal(maxTableLog, srcSize, maxSymbolValue, 1); in HUF_optimalTableLog() 218 … (HUF_CElt* CTable, unsigned* maxSymbolValuePtr, const void* src, size_t srcSize, unsigned* hasZer… in HUF_readCTable() argument 227 …e, HUF_readStats(huffWeight, HUF_SYMBOLVALUE_MAX+1, rankVal, &nbSymbols, &tableLog, src, srcSize)); in HUF_readCTable() 899 const BYTE* ip, size_t srcSize, in HUF_compress1X_usingCTable_internal_body_loop() argument 904 int n = (int)srcSize; in HUF_compress1X_usingCTable_internal_body_loop() 956 static size_t HUF_tightCompressBound(size_t srcSize, size_t tableLog) in HUF_tightCompressBound() argument 958 return ((srcSize * tableLog) >> 3) + 8; in HUF_tightCompressBound() 964 const void* src, size_t srcSize, in HUF_compress1X_usingCTable_internal_body() argument 980 if (dstSize < HUF_tightCompressBound(srcSize, (size_t)tableLog) || tableLog > 11) in HUF_compress1X_usingCTable_internal_body() [all …]
|
D | zstd_opt.h | 22 void const* src, size_t srcSize); 25 void const* src, size_t srcSize); 28 void const* src, size_t srcSize); 33 void const* src, size_t srcSize); 36 void const* src, size_t srcSize); 40 void const* src, size_t srcSize); 43 void const* src, size_t srcSize);
|
D | zstd_fast.c | 95 void const* src, size_t srcSize, in ZSTD_compressBlock_fast_noDict_generic() argument 105 const U32 endIndex = (U32)((size_t)(istart - base) + srcSize); in ZSTD_compressBlock_fast_noDict_generic() 108 const BYTE* const iend = istart + srcSize; in ZSTD_compressBlock_fast_noDict_generic() 320 void const* src, size_t srcSize) \ 322 … return ZSTD_compressBlock_fast_##dictMode##_generic(ms, seqStore, rep, src, srcSize, mls, step); \ 337 void const* src, size_t srcSize) in ZSTD_compressBlock_fast() argument 346 return ZSTD_compressBlock_fast_noDict_4_1(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast() 348 return ZSTD_compressBlock_fast_noDict_5_1(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast() 350 return ZSTD_compressBlock_fast_noDict_6_1(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast() 352 return ZSTD_compressBlock_fast_noDict_7_1(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_fast() [all …]
|
D | hist.h | 31 const void* src, size_t srcSize); 47 const void* src, size_t srcSize, 55 const void* src, size_t srcSize); 63 const void* src, size_t srcSize, 75 const void* src, size_t srcSize);
|
D | zstd_double_fast.c | 53 void const* src, size_t srcSize, U32 const mls /* template */) in ZSTD_compressBlock_doubleFast_noDict_generic() argument 63 const U32 endIndex = (U32)((size_t)(istart - base) + srcSize); in ZSTD_compressBlock_doubleFast_noDict_generic() 67 const BYTE* const iend = istart + srcSize; in ZSTD_compressBlock_doubleFast_noDict_generic() 259 void const* src, size_t srcSize, in ZSTD_compressBlock_doubleFast_dictMatchState_generic() argument 271 const U32 endIndex = (U32)((size_t)(istart - base) + srcSize); in ZSTD_compressBlock_doubleFast_dictMatchState_generic() 275 const BYTE* const iend = istart + srcSize; in ZSTD_compressBlock_doubleFast_dictMatchState_generic() 474 … void const* src, size_t srcSize) \ 476 … return ZSTD_compressBlock_doubleFast_##dictMode##_generic(ms, seqStore, rep, src, srcSize, mls); \ 492 void const* src, size_t srcSize) in ZSTD_compressBlock_doubleFast() argument 499 return ZSTD_compressBlock_doubleFast_noDict_4(ms, seqStore, rep, src, srcSize); in ZSTD_compressBlock_doubleFast() [all …]
|
D | zstd_ldm.c | 323 ldmParams_t const* params, void const* src, size_t srcSize) in ZSTD_ldm_generateSequences_internal() argument 340 BYTE const* const iend = istart + srcSize; in ZSTD_ldm_generateSequences_internal() 352 if (srcSize < minMatchLength) in ZSTD_ldm_generateSequences_internal() 507 ldmParams_t const* params, void const* src, size_t srcSize) in ZSTD_ldm_generateSequences() argument 511 BYTE const* const iend = istart + srcSize; in ZSTD_ldm_generateSequences() 513 size_t const nbChunks = (srcSize / kMaxChunkSize) + ((srcSize % kMaxChunkSize) != 0); in ZSTD_ldm_generateSequences() 521 assert(ldmState->window.nextSrc >= (BYTE const*)src + srcSize); in ZSTD_ldm_generateSequences() 583 ZSTD_ldm_skipSequences(rawSeqStore_t* rawSeqStore, size_t srcSize, U32 const minMatch) in ZSTD_ldm_skipSequences() argument 585 while (srcSize > 0 && rawSeqStore->pos < rawSeqStore->size) { in ZSTD_ldm_skipSequences() 587 if (srcSize <= seq->litLength) { in ZSTD_ldm_skipSequences() [all …]
|
D | fse_compress.c | 356 static unsigned FSE_minTableLog(size_t srcSize, unsigned maxSymbolValue) in FSE_minTableLog() argument 358 U32 minBitsSrc = BIT_highbit32((U32)(srcSize)) + 1; in FSE_minTableLog() 361 assert(srcSize > 1); /* Not supported, RLE should be used instead */ in FSE_minTableLog() 365 unsigned FSE_optimalTableLog_internal(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue… in FSE_optimalTableLog_internal() argument 367 U32 maxBitsSrc = BIT_highbit32((U32)(srcSize - 1)) - minus; in FSE_optimalTableLog_internal() 369 U32 minBits = FSE_minTableLog(srcSize, maxSymbolValue); in FSE_optimalTableLog_internal() 370 assert(srcSize > 1); /* Not supported, RLE should be used instead */ in FSE_optimalTableLog_internal() 379 unsigned FSE_optimalTableLog(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue) in FSE_optimalTableLog() argument 381 return FSE_optimalTableLog_internal(maxTableLog, srcSize, maxSymbolValue, 2); in FSE_optimalTableLog() 594 const void* src, size_t srcSize, in FSE_compress_usingCTable_generic() argument [all …]
|
D | zstd_compress.c | 64 size_t ZSTD_compressBound(size_t srcSize) { in ZSTD_compressBound() argument 65 return ZSTD_COMPRESSBOUND(srcSize); in ZSTD_compressBound() 1213 static U32 ZSTD_dictAndWindowLog(U32 windowLog, U64 srcSize, U64 dictSize) in ZSTD_dictAndWindowLog() argument 1221 assert(srcSize != ZSTD_CONTENTSIZE_UNKNOWN); /* Handled in ZSTD_adjustCParams_internal() */ in ZSTD_dictAndWindowLog() 1229 if (windowSize >= dictSize + srcSize) { in ZSTD_dictAndWindowLog() 1248 unsigned long long srcSize, in ZSTD_adjustCParams_internal() argument 1268 if (dictSize && srcSize == ZSTD_CONTENTSIZE_UNKNOWN) in ZSTD_adjustCParams_internal() 1269 srcSize = minSrcSize; in ZSTD_adjustCParams_internal() 1284 if ( (srcSize < maxWindowResize) in ZSTD_adjustCParams_internal() 1286 U32 const tSize = (U32)(srcSize + dictSize); in ZSTD_adjustCParams_internal() [all …]
|
D | zstd_compress_literals.h | 17 size_t ZSTD_noCompressLiterals (void* dst, size_t dstCapacity, const void* src, size_t srcSize); 19 …e_t ZSTD_compressRleLiteralsBlock (void* dst, size_t dstCapacity, const void* src, size_t srcSize); 26 const void* src, size_t srcSize,
|
D | zstd_double_fast.h | 22 void const* src, size_t srcSize); 25 void const* src, size_t srcSize); 28 void const* src, size_t srcSize);
|
D | zstd_fast.h | 22 void const* src, size_t srcSize); 25 void const* src, size_t srcSize); 28 void const* src, size_t srcSize);
|
D | zstd_lazy.c | 1479 const void* src, size_t srcSize, in ZSTD_compressBlock_lazy_generic() argument 1486 const BYTE* const iend = istart + srcSize; in ZSTD_compressBlock_lazy_generic() 1722 void const* src, size_t srcSize) in ZSTD_compressBlock_btlazy2() argument 1724 …return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_binaryTree, 2, ZSTD… in ZSTD_compressBlock_btlazy2() 1729 void const* src, size_t srcSize) in ZSTD_compressBlock_lazy2() argument 1731 …return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 2, ZSTD_… in ZSTD_compressBlock_lazy2() 1736 void const* src, size_t srcSize) in ZSTD_compressBlock_lazy() argument 1738 …return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 1, ZSTD_… in ZSTD_compressBlock_lazy() 1743 void const* src, size_t srcSize) in ZSTD_compressBlock_greedy() argument 1745 …return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 0, ZSTD_… in ZSTD_compressBlock_greedy() [all …]
|
D | zstd_opt.c | 125 const BYTE* const src, size_t const srcSize, in ZSTD_rescaleFreqs() argument 129 DEBUGLOG(5, "ZSTD_rescaleFreqs (srcSize=%u)", (unsigned)srcSize); in ZSTD_rescaleFreqs() 133 if (srcSize <= ZSTD_PREDEF_THRESHOLD) { /* heuristic */ in ZSTD_rescaleFreqs() 196 …HIST_count_simple(optPtr->litFreq, &lit, src, srcSize); /* use raw first block to init statistic… in ZSTD_rescaleFreqs() 1040 const void* src, size_t srcSize, in ZSTD_compressBlock_opt_generic() argument 1048 const BYTE* const iend = istart + srcSize; in ZSTD_compressBlock_opt_generic() 1073 ZSTD_rescaleFreqs(optStatePtr, (const BYTE*)src, srcSize, optLevel); in ZSTD_compressBlock_opt_generic() 1326 const void* src, size_t srcSize, const ZSTD_dictMode_e dictMode) in ZSTD_compressBlock_opt0() argument 1328 …return ZSTD_compressBlock_opt_generic(ms, seqStore, rep, src, srcSize, 0 /* optLevel */, dictMode); in ZSTD_compressBlock_opt0() 1333 const void* src, size_t srcSize, const ZSTD_dictMode_e dictMode) in ZSTD_compressBlock_opt2() argument [all …]
|
D | zstd_ldm.h | 44 ldmParams_t const* params, void const* src, size_t srcSize); 67 void const* src, size_t srcSize); 76 void ZSTD_ldm_skipSequences(rawSeqStore_t* rawSeqStore, size_t srcSize,
|
D | zstd_compress_internal.h | 453 void const* src, size_t srcSize); 503 …STD_noCompressBlock (void* dst, size_t dstCapacity, const void* src, size_t srcSize, U32 lastBlock) in ZSTD_noCompressBlock() argument 505 U32 const cBlockHeader24 = lastBlock + (((U32)bt_raw)<<1) + (U32)(srcSize << 3); in ZSTD_noCompressBlock() 506 RETURN_ERROR_IF(srcSize + ZSTD_blockHeaderSize > dstCapacity, in ZSTD_noCompressBlock() 509 ZSTD_memcpy((BYTE*)dst + ZSTD_blockHeaderSize, src, srcSize); in ZSTD_noCompressBlock() 510 return ZSTD_blockHeaderSize + srcSize; in ZSTD_noCompressBlock() 513 MEM_STATIC size_t ZSTD_rleCompressBlock (void* dst, size_t dstCapacity, BYTE src, size_t srcSize, U… in ZSTD_rleCompressBlock() argument 516 U32 const cBlockHeader = lastBlock + (((U32)bt_rle)<<1) + (U32)(srcSize << 3); in ZSTD_rleCompressBlock() 528 MEM_STATIC size_t ZSTD_minGain(size_t srcSize, ZSTD_strategy strat) in ZSTD_minGain() argument 533 return (srcSize >> minlog) + 2; in ZSTD_minGain() [all …]
|
/linux-6.6.21/lib/zstd/decompress/ |
D | zstd_decompress.c | 394 static size_t ZSTD_frameHeaderSize_internal(const void* src, size_t srcSize, ZSTD_format_e format) in ZSTD_frameHeaderSize_internal() argument 397 RETURN_ERROR_IF(srcSize < minInputSize, srcSize_wrong, ""); in ZSTD_frameHeaderSize_internal() 413 size_t ZSTD_frameHeaderSize(const void* src, size_t srcSize) in ZSTD_frameHeaderSize() argument 415 return ZSTD_frameHeaderSize_internal(src, srcSize, ZSTD_f_zstd1); in ZSTD_frameHeaderSize() 425 size_t ZSTD_getFrameHeader_advanced(ZSTD_frameHeader* zfhPtr, const void* src, size_t srcSize, ZSTD… in ZSTD_getFrameHeader_advanced() argument 431 if (srcSize < minInputSize) return minInputSize; in ZSTD_getFrameHeader_advanced() 438 if (srcSize < ZSTD_SKIPPABLEHEADERSIZE) in ZSTD_getFrameHeader_advanced() 449 { size_t const fhsize = ZSTD_frameHeaderSize_internal(src, srcSize, format); in ZSTD_getFrameHeader_advanced() 450 if (srcSize < fhsize) return fhsize; in ZSTD_getFrameHeader_advanced() 511 size_t ZSTD_getFrameHeader(ZSTD_frameHeader* zfhPtr, const void* src, size_t srcSize) in ZSTD_getFrameHeader() argument [all …]
|
D | zstd_decompress_block.c | 56 size_t ZSTD_getcBlockSize(const void* src, size_t srcSize, in ZSTD_getcBlockSize() argument 59 RETURN_ERROR_IF(srcSize < ZSTD_blockHeaderSize, srcSize_wrong, ""); in ZSTD_getcBlockSize() 109 const void* src, size_t srcSize, 120 const void* src, size_t srcSize, /* note : srcSize < BLOCKSIZE */ in ZSTD_decodeLiteralsBlock() argument 124 RETURN_ERROR_IF(srcSize < MIN_CBLOCK_SIZE, corruption_detected, ""); in ZSTD_decodeLiteralsBlock() 137 …RETURN_ERROR_IF(srcSize < 5, corruption_detected, "srcSize >= MIN_CBLOCK_SIZE == 3; here we need u… in ZSTD_decodeLiteralsBlock() 168 RETURN_ERROR_IF(litCSize + lhSize > srcSize, corruption_detected, ""); in ZSTD_decodeLiteralsBlock() 247 …if (lhSize+litSize+WILDCOPY_OVERLENGTH > srcSize) { /* risk reading beyond src buffer with wildco… in ZSTD_decodeLiteralsBlock() 248 RETURN_ERROR_IF(litSize+lhSize > srcSize, corruption_detected, ""); in ZSTD_decodeLiteralsBlock() 287 …RETURN_ERROR_IF(srcSize<4, corruption_detected, "srcSize >= MIN_CBLOCK_SIZE == 3; here we need lhS… in ZSTD_decodeLiteralsBlock() [all …]
|
/linux-6.6.21/lib/zstd/common/ |
D | huf.h | 52 const void* src, size_t srcSize); 84 const void* src, size_t srcSize, 93 const void* src, size_t srcSize, 185 unsigned HUF_optimalTableLog(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue); 189 size_t HUF_compress4X_usingCTable(void* dst, size_t dstSize, const void* src, size_t srcSize, const… 190 size_t HUF_compress4X_usingCTable_bmi2(void* dst, size_t dstSize, const void* src, size_t srcSize, … 206 const void* src, size_t srcSize, 228 const void* src, size_t srcSize); 239 const void* src, size_t srcSize, 245 … (HUF_CElt* CTable, unsigned* maxSymbolValuePtr, const void* src, size_t srcSize, unsigned *hasZer… [all …]
|
D | entropy_common.c | 253 const void* src, size_t srcSize) in HUF_readStats() argument 256 …tats_wksp(huffWeight, hwSize, rankStats, nbSymbolsPtr, tableLogPtr, src, srcSize, wksp, sizeof(wks… in HUF_readStats() 262 const void* src, size_t srcSize, in HUF_readStats_body() argument 271 if (!srcSize) return ERROR(srcSize_wrong); in HUF_readStats_body() 278 if (iSize+1 > srcSize) return ERROR(srcSize_wrong); in HUF_readStats_body() 287 if (iSize+1 > srcSize) return ERROR(srcSize_wrong); in HUF_readStats_body() 328 const void* src, size_t srcSize, in HUF_readStats_body_default() argument 331 …tats_body(huffWeight, hwSize, rankStats, nbSymbolsPtr, tableLogPtr, src, srcSize, workSpace, wkspS… in HUF_readStats_body_default() 337 const void* src, size_t srcSize, in HUF_readStats_body_bmi2() argument 340 …tats_body(huffWeight, hwSize, rankStats, nbSymbolsPtr, tableLogPtr, src, srcSize, workSpace, wkspS… in HUF_readStats_body_bmi2() [all …]
|
D | bitstream.h | 96 MEM_STATIC size_t BIT_initDStream(BIT_DStream_t* bitD, const void* srcBuffer, size_t srcSize); 258 MEM_STATIC size_t BIT_initDStream(BIT_DStream_t* bitD, const void* srcBuffer, size_t srcSize) in BIT_initDStream() argument 260 if (srcSize < 1) { ZSTD_memset(bitD, 0, sizeof(*bitD)); return ERROR(srcSize_wrong); } in BIT_initDStream() 265 if (srcSize >= sizeof(bitD->bitContainer)) { /* normal case */ in BIT_initDStream() 266 bitD->ptr = (const char*)srcBuffer + srcSize - sizeof(bitD->bitContainer); in BIT_initDStream() 268 { BYTE const lastByte = ((const BYTE*)srcBuffer)[srcSize-1]; in BIT_initDStream() 274 switch(srcSize) in BIT_initDStream() 296 { BYTE const lastByte = ((const BYTE*)srcBuffer)[srcSize-1]; in BIT_initDStream() 300 bitD->bitsConsumed += (U32)(sizeof(bitD->bitContainer) - srcSize)*8; in BIT_initDStream() 303 return srcSize; in BIT_initDStream()
|
D | fse.h | 65 const void* src, size_t srcSize); 102 FSE_PUBLIC_API size_t FSE_compress2 (void* dst, size_t dstSize, const void* src, size_t srcSize, un… 132 FSE_PUBLIC_API unsigned FSE_optimalTableLog(unsigned maxTableLog, size_t srcSize, unsigned maxSymbo… 146 … const unsigned* count, size_t srcSize, unsigned maxSymbolValue, unsigned useLowProbCount); 177 …ress_usingCTable (void* dst, size_t dstCapacity, const void* src, size_t srcSize, const FSE_CTable… 317 unsigned FSE_optimalTableLog_internal(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue… 325 size_t FSE_compress_wksp (void* dst, size_t dstSize, const void* src, size_t srcSize, unsigned maxS…
|
/linux-6.6.21/include/linux/ |
D | zstd_lib.h | 114 const void* src, size_t srcSize, 151 ZSTDLIB_API unsigned long long ZSTD_getFrameContentSize(const void *src, size_t srcSize); 159 ZSTDLIB_API unsigned long long ZSTD_getDecompressedSize(const void* src, size_t srcSize); 167 ZSTDLIB_API size_t ZSTD_findFrameCompressedSize(const void* src, size_t srcSize); 171 #define ZSTD_COMPRESSBOUND(srcSize) ((srcSize) + ((srcSize)>>8) + (((srcSize) < (128<<10)) ? (((1… argument 172 ZSTDLIB_API size_t ZSTD_compressBound(size_t srcSize); /*!< maximum compressed size in worst c… 207 const void* src, size_t srcSize, 227 const void* src, size_t srcSize); 515 const void* src, size_t srcSize); 816 const void* src, size_t srcSize, [all …]
|
D | lz4.h | 346 int LZ4_compress_HC(const char *src, char *dst, int srcSize, int dstCapacity, 416 char *dst, int srcSize, int maxDstSize); 508 char *dst, int srcSize, int maxDstSize, int acceleration);
|