| /lib/zstd/compress/ |
| A D | zstd_compress_internal.h | 576 MEM_STATIC U32 ZSTD_LLcode(U32 litLength) in ZSTD_LLcode() 593 MEM_STATIC U32 ZSTD_MLcode(U32 mlBase) in ZSTD_MLcode() 644 U32 const cBlockHeader24 = lastBlock + (((U32)bt_raw)<<1) + (U32)(srcSize << 3); in ZSTD_noCompressBlock() 657 U32 const cBlockHeader = lastBlock + (((U32)bt_rle)<<1) + (U32)(srcSize << 3); in ZSTD_rleCompressBlock() 780 pos, (U32)litLength, (U32)matchLength, (U32)offBase); in ZSTD_storeSeq() 810 ZSTD_updateRep(U32 rep[ZSTD_REP_NUM], U32 const offBase, U32 const ll0) in ZSTD_updateRep() 834 ZSTD_newRep(U32 const rep[ZSTD_REP_NUM], U32 const offBase, U32 const ll0) in ZSTD_newRep() 891 static U32 ZSTD_hash3(U32 u, U32 h, U32 s) { assert(h <= 32); return (((u << (32-24)) * prime3by… in ZSTD_hash3() 896 static U32 ZSTD_hash4(U32 u, U32 h, U32 s) { assert(h <= 32); return ((u * prime4bytes) ^ s) >> … in ZSTD_hash4() 1036 U32 const end = (U32)endT; in ZSTD_window_clear() [all …]
|
| A D | zstd_lazy.c | 43 U32 const target = (U32)(ip - base); in ZSTD_updateDUBT() 77 U32 nbCompares, U32 btLow, in ZSTD_insertDUBT1() 183 U32 const curr = (U32)(ip-base); in ZSTD_DUBT_findBetterDictMatch() 257 U32 const curr = (U32)(ip-base); in ZSTD_DUBT_findBestMatch() 415 U32 const target = (U32)(ip - base); in ZSTD_dedicatedDictSearch_lazy_loadDictionary() 643 const U32 target = (U32)(ip - base); in ZSTD_insertAndFindFirstIndex_internal() 683 const U32 curr = (U32)(ip-base); in ZSTD_HcFindBestMatch() 866 U32 ZSTD_row_nextCachedHash(U32* cache, U32 const* hashTable, in ZSTD_row_nextCachedHash() 923 const U32 target = (U32)(ip - base); in ZSTD_row_update_internal() 1159 const U32 curr = (U32)(ip-base); in ZSTD_RowFindBestMatch() [all …]
|
| A D | zstd_opt.c | 46 MEM_STATIC U32 ZSTD_bitWeight(U32 stat) in ZSTD_bitWeight() 54 MEM_STATIC U32 ZSTD_fracWeight(U32 rawStat) in ZSTD_fracWeight() 105 static U32 124 static U32 ZSTD_scaleStats(unsigned* table, U32 lastEltIndex, U32 logTarget) in ZSTD_scaleStats() 420 U32 const target = (U32)(ip - base); in ZSTD_insertAndFindFirstIndexHash3() 464 const U32 curr = (U32)(ip-base); in ZSTD_insertBt1() 569 U32 const target = (U32)(ip - base); in ZSTD_updateTree_internal() 590 U32 605 U32 const curr = (U32)(ip-base); in ZSTD_insertBtAndGetAllMatches() 824 U32*, [all …]
|
| A D | zstd_fast.c | 38 U32 const curr = (U32)(ip - base); in ZSTD_fillHashTableForCDict() 44 { U32 p; in ZSTD_fillHashTableForCDict() 75 U32 const curr = (U32)(ip - base); in ZSTD_fillHashTableForCCtx() 132 U32 mval; in ZSTD_match4Found_branch() 223 U32 offcode; in ZSTD_compressBlock_fast_noDict_generic() 238 { U32 const curr = (U32)(ip0 - base); in ZSTD_compressBlock_fast_noDict_generic() 550 U32 curr = (U32)(ip0 - base); in ZSTD_compressBlock_fast_dictMatchState_generic() 601 U32 const offset = (U32) (ip0 - match); in ZSTD_compressBlock_fast_dictMatchState_generic() 645 U32 const current2 = (U32)(ip0-base); in ZSTD_compressBlock_fast_dictMatchState_generic() 763 { U32 const curr = (U32)(ip0 - base); in ZSTD_compressBlock_fast_extDict_generic() [all …]
|
| A D | zstd_double_fast.c | 38 U32 const curr = (U32)(ip - base); in ZSTD_fillDoubleHashTableForCDict() 39 U32 i; in ZSTD_fillDoubleHashTableForCDict() 76 U32 const curr = (U32)(ip - base); in ZSTD_fillDoubleHashTableForCCtx() 77 U32 i; in ZSTD_fillDoubleHashTableForCCtx() 128 U32 offset; in ZSTD_compressBlock_doubleFast_noDict_generic() 129 U32 curr; in ZSTD_compressBlock_doubleFast_noDict_generic() 160 U32 const current = (U32)(ip - base); in ZSTD_compressBlock_doubleFast_noDict_generic() 396 U32 const curr = (U32)(ip-base); in ZSTD_compressBlock_doubleFast_dictMatchState_generic() 520 U32 const current2 = (U32)(ip-base); in ZSTD_compressBlock_doubleFast_dictMatchState_generic() 656 const U32 curr = (U32)(ip-base); in ZSTD_compressBlock_doubleFast_extDict_generic() [all …]
|
| A D | zstd_compress_literals.c | 43 U32 const flSize = 1 + (srcSize>31) + (srcSize>4095); in ZSTD_noCompressLiterals() 58 MEM_writeLE32(ostart, (U32)((U32)set_basic + (3<<2) + (srcSize<<4))); in ZSTD_noCompressLiterals() 65 DEBUGLOG(5, "Raw (uncompressed) literals: %u -> %u", (U32)srcSize, (U32)(srcSize + flSize)); in ZSTD_noCompressLiterals() 85 U32 const flSize = 1 + (srcSize>31) + (srcSize>4095); in ZSTD_compressRleLiteralsBlock() 99 MEM_writeLE32(ostart, (U32)((U32)set_rle + (3<<2) + (srcSize<<4))); in ZSTD_compressRleLiteralsBlock() 106 …teral (%02X: %u times) -> %u bytes encoded", ((const BYTE*)src)[0], (U32)srcSize, (U32)flSize + 1); in ZSTD_compressRleLiteralsBlock() 143 U32 singleStream = srcSize < 256; in ZSTD_compressLiterals() 214 … { U32 const lhc = hType + ((U32)(!singleStream) << 2) + ((U32)srcSize<<4) + ((U32)cLitSize<<14); in ZSTD_compressLiterals() 220 { U32 const lhc = hType + (2 << 2) + ((U32)srcSize<<4) + ((U32)cLitSize<<18); in ZSTD_compressLiterals() 226 { U32 const lhc = hType + (3 << 2) + ((U32)srcSize<<4) + ((U32)cLitSize<<22); in ZSTD_compressLiterals() [all …]
|
| A D | zstd_lazy.h | 31 U32 ZSTD_insertAndFindFirstIndex(ZSTD_MatchState_t* ms, const BYTE* ip); 36 void ZSTD_preserveUnsortedMark (U32* const table, U32 const size, U32 const reducerValue); /*! use… 41 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], 44 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], 47 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], 50 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], 53 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], 56 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], 59 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], 62 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], [all …]
|
| A D | fse_compress.c | 102 { U32 u; in FSE_buildCTable_wksp() 125 U32 s; in FSE_buildCTable_wksp() 351 U32 minBitsSrc = ZSTD_highbit32((U32)(srcSize)) + 1; in FSE_minTableLog() 360 U32 maxBitsSrc = ZSTD_highbit32((U32)(srcSize - 1)) - minus; in FSE_optimalTableLog_internal() 383 U32 s; in FSE_normalizeM2() 388 U32 const lowThreshold = (U32)(total >> tableLog); in FSE_normalizeM2() 389 U32 lowOne = (U32)((total * 3) >> (tableLog + 1)); in FSE_normalizeM2() 454 U32 const sStart = (U32)(tmpTotal >> vStepLog); in FSE_normalizeM2() 455 U32 const sEnd = (U32)(end >> vStepLog); in FSE_normalizeM2() 485 U32 lowThreshold = (U32)(total >> tableLog); in FSE_normalizeCount() [all …]
|
| A D | zstd_ldm.c | 38 state->rolling = ~(U32)0; in ZSTD_ldm_gear_init() 313 U32 const hash = (U32)(xxhash & (((U32)1 << hBits) - 1)); in ZSTD_ldm_fillHashTable() 334 U32 const curr = (U32)(anchor - ms->window.base); in ZSTD_ldm_limitTableUpdate() 393 U32 const hash = (U32)(xxhash & (((U32)1 << hBits) - 1)); in ZSTD_ldm_generateSequences_internal() 405 U32 offset; in ZSTD_ldm_generateSequences_internal() 408 U32 const hash = candidates[n].hash; in ZSTD_ldm_generateSequences_internal() 520 U32 u; in ZSTD_ldm_reduceTable() 611 seq->litLength -= (U32)srcSize; in ZSTD_ldm_skipSequences() 618 seq->matchLength -= (U32)srcSize; in ZSTD_ldm_skipSequences() 642 U32 const remaining, U32 const minMatch) in maybeSplitSequence() [all …]
|
| A D | huf_compress.c | 46 U32 count; 228 static void HUF_writeCTableHeader(HUF_CElt* ctable, U32 tableLog, U32 maxSymbolValue) in HUF_writeCTableHeader() 252 U32 n; in HUF_writeCTable_wksp() 294 U32 tableLog = 0; in HUF_readCTable() 295 U32 nbSymbols = 0; in HUF_readCTable() 343 U32 HUF_getNbBitsFromCTable(HUF_CElt const* CTable, U32 symbolValue) in HUF_getNbBitsFromCTable() 374 static U32 HUF_setMaxHeight(nodeElt* huffNode, U32 lastNonNull, U32 targetNbBits) in HUF_setMaxHeight() 425 U32 nBitsToDecrease = ZSTD_highbit32((U32)totalCost) + 1; in HUF_setMaxHeight() 528 static U32 HUF_getIndex(U32 const count) { in HUF_getIndex() 543 U32 i; in HUF_isSorted() [all …]
|
| A D | hist.c | 59 { U32 s; in HIST_count_simple() 81 U32* const workSpace) in HIST_count_parallel_wksp() 87 U32* const Counting1 = workSpace; in HIST_count_parallel_wksp() 88 U32* const Counting2 = Counting1 + 256; in HIST_count_parallel_wksp() 89 U32* const Counting3 = Counting2 + 256; in HIST_count_parallel_wksp() 90 U32* const Counting4 = Counting3 + 256; in HIST_count_parallel_wksp() 102 { U32 cached = MEM_read32(ip); ip += 4; in HIST_count_parallel_wksp() 104 U32 c = cached; cached = MEM_read32(ip); ip += 4; in HIST_count_parallel_wksp() 131 { U32 s; in HIST_count_parallel_wksp() 159 …return HIST_count_parallel_wksp(count, maxSymbolValuePtr, source, sourceSize, trustInput, (U32*)wo… in HIST_countFast_wksp() [all …]
|
| A D | zstd_opt.h | 26 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], 29 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], 32 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], 46 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], 49 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], 52 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM], 59 ZSTD_MatchState_t* ms, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
|
| A D | zstd_compress.c | 1361 U32 ZSTD_cycleLog(U32 hashLog, ZSTD_strategy strat) in ZSTD_cycleLog() 1363 U32 const btScale = ((U32)strat >= (U32)ZSTD_btlazy2); in ZSTD_cycleLog() 1491 U32 const tSize = (U32)(srcSize + dictSize); in ZSTD_adjustCParams_internal() 1627 (U32)chainSize, (U32)hSize, (U32)h3Size); in ZSTD_sizeof_matchState() 2568 static void ZSTD_reduceTable(U32* const table, U32 const size, U32 const reducerValue) in ZSTD_reduceTable() 2595 U32 const h3Size = (U32)1 << ms->hashLog3; in ZSTD_reduceIndex() 3208 const U32 curr = (U32)(istart-base); in ZSTD_buildSeqStore() 6023 assert((U32)flushMode <= (U32)ZSTD_e_end); in ZSTD_compressStream_generic() 6395 ZSTD_validateSequence(U32 offBase, U32 matchLength, U32 minMatch, in ZSTD_validateSequence() 6413 static U32 ZSTD_finalizeOffBase(U32 rawOffset, const U32 rep[ZSTD_REP_NUM], U32 ll0) in ZSTD_finalizeOffBase() [all …]
|
| A D | zstd_compress_sequences.h | 29 short const* defaultNorm, U32 defaultNormLog, 35 FSE_CTable* nextCTable, U32 FSELog, SymbolEncodingType_e type, 36 unsigned* count, U32 max, 38 const S16* defaultNorm, U32 defaultNormLog, U32 defaultMax,
|
| /lib/zstd/common/ |
| A D | bits.h | 17 MEM_STATIC unsigned ZSTD_countTrailingZeros32_fallback(U32 val) in ZSTD_countTrailingZeros32_fallback() 29 MEM_STATIC unsigned ZSTD_countTrailingZeros32(U32 val) in ZSTD_countTrailingZeros32() 56 MEM_STATIC unsigned ZSTD_countLeadingZeros32(U32 val) in ZSTD_countLeadingZeros32() 73 U32 mostSignificantWord = (U32)(val >> 32); in ZSTD_countTrailingZeros64() 74 U32 leastSignificantWord = (U32)val; in ZSTD_countTrailingZeros64() 91 U32 mostSignificantWord = (U32)(val >> 32); in ZSTD_countLeadingZeros64() 92 U32 leastSignificantWord = (U32)val; in ZSTD_countLeadingZeros64() 114 return ZSTD_countLeadingZeros32((U32)val) >> 3; in ZSTD_NbCommonBytes() 130 U64 ZSTD_rotateRight_U64(U64 const value, U32 count) { in ZSTD_rotateRight_U64() 137 U32 ZSTD_rotateRight_U32(U32 const value, U32 count) { in ZSTD_rotateRight_U32() [all …]
|
| A D | mem.h | 38 typedef uint32_t U32; typedef 53 MEM_STATIC U32 MEM_read32(const void* memPtr); 63 MEM_STATIC U32 MEM_readLE24(const void* memPtr); 84 MEM_STATIC U32 MEM_swap32(U32 in); 117 MEM_STATIC U32 MEM_read32(const void *memPtr) in MEM_read32() 119 return get_unaligned((const U32 *)memPtr); in MEM_read32() 139 put_unaligned(value, (U32 *)memPtr); in MEM_write32() 201 MEM_writeLE32(memPtr, (U32)val); in MEM_writeLEST() 239 MEM_writeBE32(memPtr, (U32)val); in MEM_writeBEST() 244 MEM_STATIC U32 MEM_swap32(U32 in) in MEM_swap32() [all …]
|
| A D | entropy_common.c | 52 U32 bitStream; in FSE_readNCount_body() 236 U32* nbSymbolsPtr, U32* tableLogPtr, in HUF_readStats() 245 U32* nbSymbolsPtr, U32* tableLogPtr, in HUF_readStats_body() 250 U32 weightTotal; in HUF_readStats_body() 265 { U32 n; in HUF_readStats_body() 280 { U32 n; for (n=0; n<oSize; n++) { in HUF_readStats_body() 292 { U32 const total = 1 << tableLog; in HUF_readStats_body() 305 *nbSymbolsPtr = (U32)(oSize+1); in HUF_readStats_body() 311 U32* nbSymbolsPtr, U32* tableLogPtr, in HUF_readStats_body_default() 320 U32* nbSymbolsPtr, U32* tableLogPtr, in HUF_readStats_body_bmi2() [all …]
|
| A D | cpu.h | 24 U32 f1c; 25 U32 f1d; 26 U32 f7b; 27 U32 f7c; 31 U32 f1c = 0; in ZSTD_cpuid() 32 U32 f1d = 0; in ZSTD_cpuid() 33 U32 f7b = 0; in ZSTD_cpuid() 40 U32 n; in ZSTD_cpuid() 49 U32 f1a; in ZSTD_cpuid() 68 U32 n; in ZSTD_cpuid() [all …]
|
| A D | fse.h | 426 U32 deltaNbBits; 433 const U32 tableLog = MEM_read16(ptr); in FSE_initCState() 449 U32 nbBitsOut = (U32)((symbolTT.deltaNbBits + (1<<15)) >> 16); in FSE_initCState2() 459 U32 const nbBitsOut = (U32)((statePtr->value + symbolTT.deltaNbBits) >> 16); in FSE_encodeSymbol() 476 MEM_STATIC U32 FSE_getMaxNbBits(const void* symbolTTPtr, U32 symbolValue) in FSE_getMaxNbBits() 486 MEM_STATIC U32 FSE_bitCost(const void* symbolTTPtr, U32 tableLog, U32 symbolValue, U32 accuracyLog) in FSE_bitCost() 490 U32 const threshold = (minNbBits+1) << 16; in FSE_bitCost() 493 { U32 const tableSize = 1 << tableLog; in FSE_bitCost() 536 U32 const nbBits = DInfo.nbBits; in FSE_updateState() 544 U32 const nbBits = DInfo.nbBits; in FSE_decodeSymbol() [all …]
|
| A D | huf.h | 65 typedef U32 HUF_DTable; 68 … HUF_DTable DTable[HUF_DTABLE_SIZE((maxTableLog)-1)] = { ((U32)((maxTableLog)-1) * 0x01000001) } 70 HUF_DTable DTable[HUF_DTABLE_SIZE(maxTableLog)] = { ((U32)(maxTableLog) * 0x01000001) } 165 const unsigned* count, U32 maxSymbolValue, U32 maxNbBits, 174 U32* rankStats, U32* nbSymbolsPtr, U32* tableLogPtr, 185 U32* rankStats, U32* nbSymbolsPtr, U32* tableLogPtr, 199 U32 HUF_getNbBitsFromCTable(const HUF_CElt* symbolTable, U32 symbolValue); 224 U32 HUF_selectDecoder (size_t dstSize, size_t cSrcSize); 237 #define HUF_DECOMPRESS_WORKSPACE_SIZE_U32 (HUF_DECOMPRESS_WORKSPACE_SIZE / sizeof(U32))
|
| A D | bitstream.h | 156 FORCE_INLINE_TEMPLATE BitContainerType BIT_getLowerBits(BitContainerType bitContainer, U32 const nb… in BIT_getLowerBits() 281 bitD->bitsConsumed += (U32)(sizeof(bitD->bitContainer) - srcSize)*8; in BIT_initDStream() 292 …BitContainerType BIT_getMiddleBits(BitContainerType bitContainer, U32 const start, U32 const nbBit… in BIT_getMiddleBits() 294 U32 const regMask = sizeof(bitContainer)*8 - 1; in BIT_getMiddleBits() 315 FORCE_INLINE_TEMPLATE BitContainerType BIT_lookBits(const BIT_DStream_t* bitD, U32 nbBits) in BIT_lookBits() 324 U32 const regMask = sizeof(bitD->bitContainer)*8 - 1; in BIT_lookBits() 331 MEM_STATIC BitContainerType BIT_lookBitsFast(const BIT_DStream_t* bitD, U32 nbBits) in BIT_lookBitsFast() 333 U32 const regMask = sizeof(bitD->bitContainer)*8 - 1; in BIT_lookBitsFast() 338 FORCE_INLINE_TEMPLATE void BIT_skipBits(BIT_DStream_t* bitD, U32 nbBits) in BIT_skipBits() 418 { U32 nbBytes = bitD->bitsConsumed >> 3; in BIT_reloadDStream() [all …]
|
| /lib/zstd/decompress/ |
| A D | zstd_decompress_internal.h | 31 static UNUSED_ATTR const U32 LL_base[MaxLL+1] = { 38 static UNUSED_ATTR const U32 OF_base[MaxOff+1] = { 64 U32 fastMode; 65 U32 tableLog; 72 U32 baseValue; 78 …TD_BUILD_FSE_TABLE_WKSP_SIZE_U32 ((ZSTD_BUILD_FSE_TABLE_WKSP_SIZE + sizeof(U32) - 1) / sizeof(U32)) 86 U32 rep[ZSTD_REP_NUM]; 145 U32 litEntropy; 146 U32 fseEntropy; 165 U32 dictID; [all …]
|
| A D | huf_decompress.c | 349 static U32 HUF_rescaleStats(BYTE* huffWeight, U32* rankVal, U32 nbSymbols, U32 tableLog, U32 target… in HUF_rescaleStats() 355 U32 s; in HUF_rescaleStats() 452 { U32 w; in HUF_readDTableX1_wksp() 958 static U32 HUF_buildDEltX2U32(U32 symbol, U32 nbBits, U32 baseSeq, int level) in HUF_buildDEltX2U32() 960 U32 seq; in HUF_buildDEltX2U32() 977 static HUF_DEltX2 HUF_buildDEltX2(U32 symbol, U32 nbBits, U32 baseSeq, int level) in HUF_buildDEltX2() 1010 U32 nbBits, U32 tableLog, in HUF_fillDTableX2ForWeight() 1222 { U32 s; in HUF_readDTableX2_wksp() 1470 endSignal = (U32)LIKELY((U32) in HUF_decompress4X2_usingDTable_internal_body() 1790 typedef struct { U32 tableTime; U32 decode256Time; } algo_time_t; [all …]
|
| /lib/lz4/ |
| A D | lz4defs.h | 53 typedef uint32_t U32; typedef 112 static FORCE_INLINE U32 LZ4_read32(const void *ptr) in LZ4_read32() 114 return get_unaligned((const U32 *)ptr); in LZ4_read32() 127 static FORCE_INLINE void LZ4_write32(void *memPtr, U32 value) in LZ4_write32() 129 put_unaligned(value, (U32 *)memPtr); in LZ4_write32() 160 U32 a = get_unaligned((const U32 *)src); in LZ4_copy8() 161 U32 b = get_unaligned((const U32 *)src + 1); in LZ4_copy8() 163 put_unaligned(a, (U32 *)dst); in LZ4_copy8() 164 put_unaligned(b, (U32 *)dst + 1); in LZ4_copy8()
|
| A D | lz4_compress.c | 48 U32 sequence, in LZ4_hash4() 92 U32 h, in LZ4_putPositionOnHash() 107 U32 *hashTable = (U32 *) tableBase; in LZ4_putPositionOnHash() 134 U32 h, in LZ4_getPositionOnHash() 146 const U32 * const hashTable = (U32 *) tableBase; in LZ4_getPositionOnHash() 185 const U32 acceleration) in LZ4_compress_generic() 202 U32 forwardH; in LZ4_compress_generic() 206 if ((U32)inputSize > (U32)LZ4_MAX_INPUT_SIZE) { in LZ4_compress_generic() 545 U32 forwardH; in LZ4_compress_destSize_generic() 552 if ((U32)*srcSizePtr > (U32)LZ4_MAX_INPUT_SIZE) in LZ4_compress_destSize_generic() [all …]
|