/linux-6.1.9/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 | 33 void const* src, size_t srcSize); 36 void const* src, size_t srcSize); 39 void const* src, size_t srcSize); 42 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); 55 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() 160 … (HUF_CElt* CTable, unsigned* maxSymbolValuePtr, const void* src, size_t srcSize, unsigned* hasZer… in HUF_readCTable() argument 168 …e, HUF_readStats(huffWeight, HUF_SYMBOLVALUE_MAX+1, rankVal, &nbSymbols, &tableLog, src, srcSize)); in HUF_readCTable() 578 const void* src, size_t srcSize, in HUF_compress1X_usingCTable_internal_body() argument 593 n = srcSize & ~3; /* join to mod 4 */ in HUF_compress1X_usingCTable_internal_body() 594 switch (srcSize & 3) in HUF_compress1X_usingCTable_internal_body() 630 const void* src, size_t srcSize, in HUF_compress1X_usingCTable_internal_bmi2() argument 633 return HUF_compress1X_usingCTable_internal_body(dst, dstSize, src, srcSize, CTable); in HUF_compress1X_usingCTable_internal_bmi2() 638 const void* src, size_t srcSize, in HUF_compress1X_usingCTable_internal_default() argument [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 | 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_fast.c | 49 void const* src, size_t srcSize, in ZSTD_compressBlock_fast_generic() argument 63 const U32 endIndex = (U32)((size_t)(istart - base) + srcSize); in ZSTD_compressBlock_fast_generic() 66 const BYTE* const iend = istart + srcSize; in ZSTD_compressBlock_fast_generic() 188 void const* src, size_t srcSize) in ZSTD_compressBlock_fast() argument 196 return ZSTD_compressBlock_fast_generic(ms, seqStore, rep, src, srcSize, 4); in ZSTD_compressBlock_fast() 198 return ZSTD_compressBlock_fast_generic(ms, seqStore, rep, src, srcSize, 5); in ZSTD_compressBlock_fast() 200 return ZSTD_compressBlock_fast_generic(ms, seqStore, rep, src, srcSize, 6); in ZSTD_compressBlock_fast() 202 return ZSTD_compressBlock_fast_generic(ms, seqStore, rep, src, srcSize, 7); in ZSTD_compressBlock_fast() 209 void const* src, size_t srcSize, U32 const mls) in ZSTD_compressBlock_fast_dictMatchState_generic() argument 222 const BYTE* const iend = istart + srcSize; in ZSTD_compressBlock_fast_dictMatchState_generic() [all …]
|
D | zstd_ldm.c | 296 ldmParams_t const* params, void const* src, size_t srcSize) in ZSTD_ldm_generateSequences_internal() argument 313 BYTE const* const iend = istart + srcSize; in ZSTD_ldm_generateSequences_internal() 325 if (srcSize < minMatchLength) in ZSTD_ldm_generateSequences_internal() 472 ldmParams_t const* params, void const* src, size_t srcSize) in ZSTD_ldm_generateSequences() argument 476 BYTE const* const iend = istart + srcSize; in ZSTD_ldm_generateSequences() 478 size_t const nbChunks = (srcSize / kMaxChunkSize) + ((srcSize % kMaxChunkSize) != 0); in ZSTD_ldm_generateSequences() 486 assert(ldmState->window.nextSrc >= (BYTE const*)src + srcSize); in ZSTD_ldm_generateSequences() 547 void ZSTD_ldm_skipSequences(rawSeqStore_t* rawSeqStore, size_t srcSize, U32 const minMatch) { in ZSTD_ldm_skipSequences() argument 548 while (srcSize > 0 && rawSeqStore->pos < rawSeqStore->size) { in ZSTD_ldm_skipSequences() 550 if (srcSize <= seq->litLength) { in ZSTD_ldm_skipSequences() [all …]
|
D | fse_compress.c | 313 static unsigned FSE_minTableLog(size_t srcSize, unsigned maxSymbolValue) in FSE_minTableLog() argument 315 U32 minBitsSrc = BIT_highbit32((U32)(srcSize)) + 1; in FSE_minTableLog() 318 assert(srcSize > 1); /* Not supported, RLE should be used instead */ in FSE_minTableLog() 322 unsigned FSE_optimalTableLog_internal(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue… in FSE_optimalTableLog_internal() argument 324 U32 maxBitsSrc = BIT_highbit32((U32)(srcSize - 1)) - minus; in FSE_optimalTableLog_internal() 326 U32 minBits = FSE_minTableLog(srcSize, maxSymbolValue); in FSE_optimalTableLog_internal() 327 assert(srcSize > 1); /* Not supported, RLE should be used instead */ in FSE_optimalTableLog_internal() 336 unsigned FSE_optimalTableLog(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue) in FSE_optimalTableLog() argument 338 return FSE_optimalTableLog_internal(maxTableLog, srcSize, maxSymbolValue, 2); in FSE_optimalTableLog() 551 const void* src, size_t srcSize, in FSE_compress_usingCTable_generic() argument [all …]
|
D | zstd_double_fast.c | 53 void const* src, size_t srcSize, in ZSTD_compressBlock_doubleFast_generic() argument 65 const U32 endIndex = (U32)((size_t)(istart - base) + srcSize); in ZSTD_compressBlock_doubleFast_generic() 69 const BYTE* const iend = istart + srcSize; in ZSTD_compressBlock_doubleFast_generic() 319 void const* src, size_t srcSize) in ZSTD_compressBlock_doubleFast() argument 326 … return ZSTD_compressBlock_doubleFast_generic(ms, seqStore, rep, src, srcSize, 4, ZSTD_noDict); in ZSTD_compressBlock_doubleFast() 328 … return ZSTD_compressBlock_doubleFast_generic(ms, seqStore, rep, src, srcSize, 5, ZSTD_noDict); in ZSTD_compressBlock_doubleFast() 330 … return ZSTD_compressBlock_doubleFast_generic(ms, seqStore, rep, src, srcSize, 6, ZSTD_noDict); in ZSTD_compressBlock_doubleFast() 332 … return ZSTD_compressBlock_doubleFast_generic(ms, seqStore, rep, src, srcSize, 7, ZSTD_noDict); in ZSTD_compressBlock_doubleFast() 339 void const* src, size_t srcSize) in ZSTD_compressBlock_doubleFast_dictMatchState() argument 346 …return ZSTD_compressBlock_doubleFast_generic(ms, seqStore, rep, src, srcSize, 4, ZSTD_dictMatchSta… in ZSTD_compressBlock_doubleFast_dictMatchState() [all …]
|
D | zstd_compress.c | 53 size_t ZSTD_compressBound(size_t srcSize) { in ZSTD_compressBound() argument 54 return ZSTD_COMPRESSBOUND(srcSize); in ZSTD_compressBound() 1096 static U32 ZSTD_dictAndWindowLog(U32 windowLog, U64 srcSize, U64 dictSize) in ZSTD_dictAndWindowLog() argument 1104 assert(srcSize != ZSTD_CONTENTSIZE_UNKNOWN); /* Handled in ZSTD_adjustCParams_internal() */ in ZSTD_dictAndWindowLog() 1112 if (windowSize >= dictSize + srcSize) { in ZSTD_dictAndWindowLog() 1131 unsigned long long srcSize, in ZSTD_adjustCParams_internal() argument 1151 if (dictSize && srcSize == ZSTD_CONTENTSIZE_UNKNOWN) in ZSTD_adjustCParams_internal() 1152 srcSize = minSrcSize; in ZSTD_adjustCParams_internal() 1167 if ( (srcSize < maxWindowResize) in ZSTD_adjustCParams_internal() 1169 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); 25 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_ldm.h | 44 ldmParams_t const* params, void const* src, size_t srcSize); 66 void const* src, size_t srcSize); 75 void ZSTD_ldm_skipSequences(rawSeqStore_t* rawSeqStore, size_t srcSize,
|
D | zstd_lazy.c | 860 const void* src, size_t srcSize, in ZSTD_compressBlock_lazy_generic() argument 867 const BYTE* const iend = istart + srcSize; in ZSTD_compressBlock_lazy_generic() 1127 void const* src, size_t srcSize) in ZSTD_compressBlock_btlazy2() argument 1129 …return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_binaryTree, 2, ZSTD… in ZSTD_compressBlock_btlazy2() 1134 void const* src, size_t srcSize) in ZSTD_compressBlock_lazy2() argument 1136 …return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 2, ZSTD_… in ZSTD_compressBlock_lazy2() 1141 void const* src, size_t srcSize) in ZSTD_compressBlock_lazy() argument 1143 …return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 1, ZSTD_… in ZSTD_compressBlock_lazy() 1148 void const* src, size_t srcSize) in ZSTD_compressBlock_greedy() argument 1150 …return ZSTD_compressBlock_lazy_generic(ms, seqStore, rep, src, srcSize, search_hashChain, 0, ZSTD_… in ZSTD_compressBlock_greedy() [all …]
|
D | zstd_opt.c | 117 const BYTE* const src, size_t const srcSize, in ZSTD_rescaleFreqs() argument 121 DEBUGLOG(5, "ZSTD_rescaleFreqs (srcSize=%u)", (unsigned)srcSize); in ZSTD_rescaleFreqs() 125 if (srcSize <= ZSTD_PREDEF_THRESHOLD) { /* heuristic */ in ZSTD_rescaleFreqs() 188 …HIST_count_simple(optPtr->litFreq, &lit, src, srcSize); /* use raw first block to init statistic… in ZSTD_rescaleFreqs() 946 const void* src, size_t srcSize, in ZSTD_compressBlock_opt_generic() argument 954 const BYTE* const iend = istart + srcSize; in ZSTD_compressBlock_opt_generic() 977 ZSTD_rescaleFreqs(optStatePtr, (const BYTE*)src, srcSize, optLevel); in ZSTD_compressBlock_opt_generic() 1229 const void* src, size_t srcSize) in ZSTD_compressBlock_btopt() argument 1232 …return ZSTD_compressBlock_opt_generic(ms, seqStore, rep, src, srcSize, 0 /*optLevel*/, ZSTD_noDict… in ZSTD_compressBlock_btopt() 1268 const void* src, size_t srcSize) in ZSTD_initStats_ultra() argument [all …]
|
D | zstd_compress_internal.h | 360 void const* src, size_t srcSize); 435 …STD_noCompressBlock (void* dst, size_t dstCapacity, const void* src, size_t srcSize, U32 lastBlock) in ZSTD_noCompressBlock() argument 437 U32 const cBlockHeader24 = lastBlock + (((U32)bt_raw)<<1) + (U32)(srcSize << 3); in ZSTD_noCompressBlock() 438 RETURN_ERROR_IF(srcSize + ZSTD_blockHeaderSize > dstCapacity, in ZSTD_noCompressBlock() 441 ZSTD_memcpy((BYTE*)dst + ZSTD_blockHeaderSize, src, srcSize); in ZSTD_noCompressBlock() 442 return ZSTD_blockHeaderSize + srcSize; in ZSTD_noCompressBlock() 445 MEM_STATIC size_t ZSTD_rleCompressBlock (void* dst, size_t dstCapacity, BYTE src, size_t srcSize, U… in ZSTD_rleCompressBlock() argument 448 U32 const cBlockHeader = lastBlock + (((U32)bt_rle)<<1) + (U32)(srcSize << 3); in ZSTD_rleCompressBlock() 460 MEM_STATIC size_t ZSTD_minGain(size_t srcSize, ZSTD_strategy strat) in ZSTD_minGain() argument 465 return (srcSize >> minlog) + 2; in ZSTD_minGain() [all …]
|
D | zstd_compress_superblock.c | 61 static size_t ZSTD_buildSuperBlockEntropy_literal(void* const src, size_t srcSize, in ZSTD_buildSuperBlockEntropy_literal() argument 79 DEBUGLOG(5, "ZSTD_buildSuperBlockEntropy_literal (srcSize=%zu)", srcSize); in ZSTD_buildSuperBlockEntropy_literal() 93 if (srcSize <= minLitSize) { in ZSTD_buildSuperBlockEntropy_literal() 101 …largest = HIST_count_wksp (countWksp, &maxSymbolValue, (const BYTE*)src, srcSize, workspace, wkspS… in ZSTD_buildSuperBlockEntropy_literal() 103 if (largest == srcSize) { in ZSTD_buildSuperBlockEntropy_literal() 108 if (largest <= (srcSize >> 7)+4) { in ZSTD_buildSuperBlockEntropy_literal() 122 huffLog = HUF_optimalTableLog(huffLog, srcSize, maxSymbolValue); in ZSTD_buildSuperBlockEntropy_literal() 139 if (oldCSize < srcSize && (oldCSize <= hSize + newCSize || hSize + 12 >= srcSize)) { in ZSTD_buildSuperBlockEntropy_literal() 146 if (newCSize + hSize >= srcSize) { in ZSTD_buildSuperBlockEntropy_literal() 710 const void* src, size_t srcSize, in ZSTD_compressSubBlock_multi() argument [all …]
|
/linux-6.1.9/include/linux/ |
D | zstd_lib.h | 107 const void* src, size_t srcSize, 144 ZSTDLIB_API unsigned long long ZSTD_getFrameContentSize(const void *src, size_t srcSize); 152 ZSTDLIB_API unsigned long long ZSTD_getDecompressedSize(const void* src, size_t srcSize); 160 ZSTDLIB_API size_t ZSTD_findFrameCompressedSize(const void* src, size_t srcSize); 164 #define ZSTD_COMPRESSBOUND(srcSize) ((srcSize) + ((srcSize)>>8) + (((srcSize) < (128<<10)) ? (((1… argument 165 ZSTDLIB_API size_t ZSTD_compressBound(size_t srcSize); /*!< maximum compressed size in worst c… 199 const void* src, size_t srcSize, 219 const void* src, size_t srcSize); 504 const void* src, size_t srcSize); 805 const void* src, size_t srcSize, [all …]
|
/linux-6.1.9/lib/zstd/decompress/ |
D | zstd_decompress.c | 378 static size_t ZSTD_frameHeaderSize_internal(const void* src, size_t srcSize, ZSTD_format_e format) in ZSTD_frameHeaderSize_internal() argument 381 RETURN_ERROR_IF(srcSize < minInputSize, srcSize_wrong, ""); in ZSTD_frameHeaderSize_internal() 397 size_t ZSTD_frameHeaderSize(const void* src, size_t srcSize) in ZSTD_frameHeaderSize() argument 399 return ZSTD_frameHeaderSize_internal(src, srcSize, ZSTD_f_zstd1); in ZSTD_frameHeaderSize() 409 size_t ZSTD_getFrameHeader_advanced(ZSTD_frameHeader* zfhPtr, const void* src, size_t srcSize, ZSTD… in ZSTD_getFrameHeader_advanced() argument 415 if (srcSize < minInputSize) return minInputSize; in ZSTD_getFrameHeader_advanced() 422 if (srcSize < ZSTD_SKIPPABLEHEADERSIZE) in ZSTD_getFrameHeader_advanced() 433 { size_t const fhsize = ZSTD_frameHeaderSize_internal(src, srcSize, format); in ZSTD_getFrameHeader_advanced() 434 if (srcSize < fhsize) return fhsize; in ZSTD_getFrameHeader_advanced() 495 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() 75 const void* src, size_t srcSize); 80 const void* src, size_t srcSize) /* note : srcSize < BLOCKSIZE */ in ZSTD_decodeLiteralsBlock() argument 83 RETURN_ERROR_IF(srcSize < MIN_CBLOCK_SIZE, corruption_detected, ""); in ZSTD_decodeLiteralsBlock() 96 …RETURN_ERROR_IF(srcSize < 5, corruption_detected, "srcSize >= MIN_CBLOCK_SIZE == 3; here we need u… in ZSTD_decodeLiteralsBlock() 125 RETURN_ERROR_IF(litCSize + lhSize > srcSize, corruption_detected, ""); in ZSTD_decodeLiteralsBlock() 192 …if (lhSize+litSize+WILDCOPY_OVERLENGTH > srcSize) { /* risk reading beyond src buffer with wildco… in ZSTD_decodeLiteralsBlock() 193 RETURN_ERROR_IF(litSize+lhSize > srcSize, corruption_detected, ""); in ZSTD_decodeLiteralsBlock() 222 …RETURN_ERROR_IF(srcSize<4, corruption_detected, "srcSize >= MIN_CBLOCK_SIZE == 3; here we need lhS… in ZSTD_decodeLiteralsBlock() [all …]
|
/linux-6.1.9/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, 189 unsigned HUF_optimalTableLog(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue); 193 size_t HUF_compress4X_usingCTable(void* dst, size_t dstSize, const void* src, size_t srcSize, const… 208 const void* src, size_t srcSize, 230 const void* src, size_t srcSize); 241 const void* src, size_t srcSize, 247 … (HUF_CElt* CTable, unsigned* maxSymbolValuePtr, const void* src, size_t srcSize, unsigned *hasZer… 283 size_t HUF_readDTableX1 (HUF_DTable* DTable, const void* src, size_t srcSize); [all …]
|
D | entropy_common.c | 254 const void* src, size_t srcSize) in HUF_readStats() argument 257 …tats_wksp(huffWeight, hwSize, rankStats, nbSymbolsPtr, tableLogPtr, src, srcSize, wksp, sizeof(wks… in HUF_readStats() 264 const void* src, size_t srcSize, in HUF_readStats_body() argument 273 if (!srcSize) return ERROR(srcSize_wrong); in HUF_readStats_body() 280 if (iSize+1 > srcSize) return ERROR(srcSize_wrong); in HUF_readStats_body() 289 if (iSize+1 > srcSize) return ERROR(srcSize_wrong); in HUF_readStats_body() 330 const void* src, size_t srcSize, in HUF_readStats_body_default() argument 333 …tats_body(huffWeight, hwSize, rankStats, nbSymbolsPtr, tableLogPtr, src, srcSize, workSpace, wkspS… in HUF_readStats_body_default() 339 const void* src, size_t srcSize, in HUF_readStats_body_bmi2() argument 342 …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…
|