Lines Matching refs:U32
79 U32 off; /* Offset code (offset + ZSTD_REP_MOVE) for the match */
80 U32 len; /* Raw length of match */
84 U32 offset; /* Offset of sequence */
85 U32 litLength; /* Length of literals prior to match */
86 U32 matchLength; /* Raw length of match */
102 U32 off;
103 U32 mlen;
104 U32 litlen;
105 U32 rep[ZSTD_REP_NUM];
119 U32 litSum; /* nb of literals */
120 U32 litLengthSum; /* nb of litLength codes */
121 U32 matchLengthSum; /* nb of matchLength codes */
122 U32 offCodeSum; /* nb of offset codes */
123 U32 litSumBasePrice; /* to compare to log2(litfreq) */
124 U32 litLengthSumBasePrice; /* to compare to log2(llfreq) */
125 U32 matchLengthSumBasePrice;/* to compare to log2(mlfreq) */
126 U32 offCodeSumBasePrice; /* to compare to log2(offreq) */
134 U32 rep[ZSTD_REP_NUM];
141 U32 dictLimit; /* below that point, need extDict */
142 U32 lowLimit; /* below that point, no more valid data */
148 U32 loadedDictEnd; /* index of end of dictionary, within context's referential.
155 U32 nextToUpdate; /* index from which to continue table update */
156 … U32 hashLog3; /* dispatch table for matches of len==3 : larger == faster, more memory */
157 U32* hashTable;
158 U32* hashTable3;
159 U32* chainTable;
176 U32 offset;
177 U32 checksum;
182 U32 hash;
183 U32 checksum;
192 U32 loadedDictEnd;
199 U32 enableLdm; /* 1 if enable long distance matching */
200 U32 hashLog; /* Log size of hashTable */
201 U32 bucketSizeLog; /* Log bucket size for collision resolution, at most 8 */
202 U32 minMatchLength; /* Minimum match length */
203 U32 hashRateLog; /* Log number of entries to skip */
204 U32 windowLog; /* Window log for the LDM */
275 U32 dictID;
297 U32* entropyWorkspace; /* entropy workspace of ENTROPY_WORKSPACE_SIZE bytes */
313 U32 frameEnded;
359 ZSTD_matchState_t* bs, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
364 MEM_STATIC U32 ZSTD_LLcode(U32 litLength) in ZSTD_LLcode()
374 static const U32 LL_deltaCode = 19; in ZSTD_LLcode()
381 MEM_STATIC U32 ZSTD_MLcode(U32 mlBase) in ZSTD_MLcode()
391 static const U32 ML_deltaCode = 36; in ZSTD_MLcode()
396 U32 rep[3];
399 MEM_STATIC repcodes_t ZSTD_updateRep(U32 const rep[3], U32 const offset, U32 const ll0) in ZSTD_updateRep()
407 U32 const repCode = offset + ll0; in ZSTD_updateRep()
409 U32 const currentOffset = (repCode==ZSTD_REP_NUM) ? (rep[0] - 1) : rep[repCode]; in ZSTD_updateRep()
435 …STD_noCompressBlock (void* dst, size_t dstCapacity, const void* src, size_t srcSize, U32 lastBlock) in ZSTD_noCompressBlock()
437 U32 const cBlockHeader24 = lastBlock + (((U32)bt_raw)<<1) + (U32)(srcSize << 3); in ZSTD_noCompressBlock()
445 …ze_t ZSTD_rleCompressBlock (void* dst, size_t dstCapacity, BYTE src, size_t srcSize, U32 lastBlock) in ZSTD_rleCompressBlock()
448 U32 const cBlockHeader = lastBlock + (((U32)bt_rle)<<1) + (U32)(srcSize << 3); in ZSTD_rleCompressBlock()
462 U32 const minlog = (strat>=ZSTD_btultra) ? (U32)(strat) - 1 : 6; in ZSTD_minGain()
505 …seqStorePtr, size_t litLength, const BYTE* literals, const BYTE* litLimit, U32 offCode, size_t mlB… in ZSTD_storeSeq()
512 { U32 const pos = (U32)((const BYTE*)literals - g_start); in ZSTD_storeSeq()
514 pos, (U32)litLength, (U32)mlBase+MINMATCH, (U32)offCode); in ZSTD_storeSeq()
540 seqStorePtr->longLengthPos = (U32)(seqStorePtr->sequences - seqStorePtr->sequencesStart); in ZSTD_storeSeq()
551 seqStorePtr->longLengthPos = (U32)(seqStorePtr->sequences - seqStorePtr->sequencesStart); in ZSTD_storeSeq()
581 return (__builtin_ctz((U32)val) >> 3); in ZSTD_NbCommonBytes()
587 return DeBruijnBytePos[((U32)((val & -(S32)val) * 0x077CB531U)) >> 27]; in ZSTD_NbCommonBytes()
604 return (__builtin_clz((U32)val) >> 3); in ZSTD_NbCommonBytes()
659 static const U32 prime3bytes = 506832829U;
660 static U32 ZSTD_hash3(U32 u, U32 h) { return ((u << (32-24)) * prime3bytes) >> (32-h) ; } in ZSTD_hash3()
661 MEM_STATIC size_t ZSTD_hash3Ptr(const void* ptr, U32 h) { return ZSTD_hash3(MEM_readLE32(ptr), h); … in ZSTD_hash3Ptr()
663 static const U32 prime4bytes = 2654435761U;
664 static U32 ZSTD_hash4(U32 u, U32 h) { return (u * prime4bytes) >> (32-h) ; } in ZSTD_hash4()
665 static size_t ZSTD_hash4Ptr(const void* ptr, U32 h) { return ZSTD_hash4(MEM_read32(ptr), h); } in ZSTD_hash4Ptr()
668 static size_t ZSTD_hash5(U64 u, U32 h) { return (size_t)(((u << (64-40)) * prime5bytes) >> (64-h))… in ZSTD_hash5()
669 static size_t ZSTD_hash5Ptr(const void* p, U32 h) { return ZSTD_hash5(MEM_readLE64(p), h); } in ZSTD_hash5Ptr()
672 static size_t ZSTD_hash6(U64 u, U32 h) { return (size_t)(((u << (64-48)) * prime6bytes) >> (64-h))… in ZSTD_hash6()
673 static size_t ZSTD_hash6Ptr(const void* p, U32 h) { return ZSTD_hash6(MEM_readLE64(p), h); } in ZSTD_hash6Ptr()
676 static size_t ZSTD_hash7(U64 u, U32 h) { return (size_t)(((u << (64-56)) * prime7bytes) >> (64-h))… in ZSTD_hash7()
677 static size_t ZSTD_hash7Ptr(const void* p, U32 h) { return ZSTD_hash7(MEM_readLE64(p), h); } in ZSTD_hash7Ptr()
680 static size_t ZSTD_hash8(U64 u, U32 h) { return (size_t)(((u) * prime8bytes) >> (64-h)) ; } in ZSTD_hash8()
681 static size_t ZSTD_hash8Ptr(const void* p, U32 h) { return ZSTD_hash8(MEM_readLE64(p), h); } in ZSTD_hash8Ptr()
684 size_t ZSTD_hashPtr(const void* p, U32 hBits, U32 mls) in ZSTD_hashPtr()
739 MEM_STATIC U64 ZSTD_rollingHash_primePower(U32 length) in ZSTD_rollingHash_primePower()
765 ( ((U32)-1) /* Maximum ending current index */ \
775 U32 const end = (U32)endT; in ZSTD_window_clear()
785 MEM_STATIC U32 ZSTD_window_hasExtDict(ZSTD_window_t const window) in ZSTD_window_hasExtDict()
809 MEM_STATIC U32 ZSTD_window_needOverflowCorrection(ZSTD_window_t const window, in ZSTD_window_needOverflowCorrection()
812 U32 const curr = (U32)((BYTE const*)srcEnd - window.base); in ZSTD_window_needOverflowCorrection()
826 MEM_STATIC U32 ZSTD_window_correctOverflow(ZSTD_window_t* window, U32 cycleLog, in ZSTD_window_correctOverflow()
827 U32 maxDist, void const* src) in ZSTD_window_correctOverflow()
848 U32 const cycleMask = (1U << cycleLog) - 1; in ZSTD_window_correctOverflow()
849 U32 const curr = (U32)((BYTE const*)src - window->base); in ZSTD_window_correctOverflow()
850 U32 const currentCycle0 = curr & cycleMask; in ZSTD_window_correctOverflow()
852 U32 const currentCycle1 = currentCycle0 == 0 ? (1U << cycleLog) : currentCycle0; in ZSTD_window_correctOverflow()
853 U32 const newCurrent = currentCycle1 + maxDist; in ZSTD_window_correctOverflow()
854 U32 const correction = curr - newCurrent; in ZSTD_window_correctOverflow()
905 U32 maxDist, in ZSTD_window_enforceMaxDist()
906 U32* loadedDictEndPtr, in ZSTD_window_enforceMaxDist()
909 U32 const blockEndIdx = (U32)((BYTE const*)blockEnd - window->base); in ZSTD_window_enforceMaxDist()
910 U32 const loadedDictEnd = (loadedDictEndPtr != NULL) ? *loadedDictEndPtr : 0; in ZSTD_window_enforceMaxDist()
928 U32 const newLowLimit = blockEndIdx - maxDist; in ZSTD_window_enforceMaxDist()
950 U32 maxDist, in ZSTD_checkDictValidity()
951 U32* loadedDictEndPtr, in ZSTD_checkDictValidity()
956 { U32 const blockEndIdx = (U32)((BYTE const*)blockEnd - window->base); in ZSTD_checkDictValidity()
957 U32 const loadedDictEnd = *loadedDictEndPtr; in ZSTD_checkDictValidity()
992 MEM_STATIC U32 ZSTD_window_update(ZSTD_window_t* window, in ZSTD_window_update()
996 U32 contiguous = 1; in ZSTD_window_update()
1008 assert(distanceFromBase == (size_t)(U32)distanceFromBase); /* should never overflow */ in ZSTD_window_update()
1009 window->dictLimit = (U32)distanceFromBase; in ZSTD_window_update()
1021 …U32 const lowLimitMax = (highInputIdx > (ptrdiff_t)window->dictLimit) ? window->dictLimit : (U32)h… in ZSTD_window_update()
1031 MEM_STATIC U32 ZSTD_getLowestMatchIndex(const ZSTD_matchState_t* ms, U32 curr, unsigned windowLog) in ZSTD_getLowestMatchIndex()
1033 U32 const maxDistance = 1U << windowLog; in ZSTD_getLowestMatchIndex()
1034 U32 const lowestValid = ms->window.lowLimit; in ZSTD_getLowestMatchIndex()
1035 … U32 const withinWindow = (curr - lowestValid > maxDistance) ? curr - maxDistance : lowestValid; in ZSTD_getLowestMatchIndex()
1036 U32 const isDictionary = (ms->loadedDictEnd != 0); in ZSTD_getLowestMatchIndex()
1041 U32 const matchLowest = isDictionary ? lowestValid : withinWindow; in ZSTD_getLowestMatchIndex()
1048 MEM_STATIC U32 ZSTD_getLowestPrefixIndex(const ZSTD_matchState_t* ms, U32 curr, unsigned windowLog) in ZSTD_getLowestPrefixIndex()
1050 U32 const maxDistance = 1U << windowLog; in ZSTD_getLowestPrefixIndex()
1051 U32 const lowestValid = ms->window.dictLimit; in ZSTD_getLowestPrefixIndex()
1052 … U32 const withinWindow = (curr - lowestValid > maxDistance) ? curr - maxDistance : lowestValid; in ZSTD_getLowestPrefixIndex()
1053 U32 const isDictionary = (ms->loadedDictEnd != 0); in ZSTD_getLowestPrefixIndex()
1057 U32 const matchLowest = isDictionary ? lowestValid : withinWindow; in ZSTD_getLowestPrefixIndex()
1066 MEM_STATIC double ZSTD_fWeight(U32 rawStat) in ZSTD_fWeight()
1068 U32 const fp_accuracy = 8; in ZSTD_fWeight()
1069 U32 const fp_multiplier = (1 << fp_accuracy); in ZSTD_fWeight()
1070 U32 const newStat = rawStat + 1; in ZSTD_fWeight()
1071 U32 const hb = ZSTD_highbit32(newStat); in ZSTD_fWeight()
1072 U32 const BWeight = hb * fp_multiplier; in ZSTD_fWeight()
1073 U32 const FWeight = (newStat << fp_accuracy) >> hb; in ZSTD_fWeight()
1074 U32 const weight = BWeight + FWeight; in ZSTD_fWeight()
1081 MEM_STATIC void ZSTD_debugTable(const U32* table, U32 max) in ZSTD_debugTable()
1181 U32 ZSTD_cycleLog(U32 hashLog, ZSTD_strategy strat);