Lines Matching refs:U32
126 U32 off; /* Offset sumtype code for the match, using ZSTD_storeSeq() format */
127 U32 len; /* Raw length of match */
131 U32 offset; /* Offset of sequence */
132 U32 litLength; /* Length of literals prior to match */
133 U32 matchLength; /* Raw length of match */
149 U32 off;
150 U32 mlen;
151 U32 litlen;
152 U32 rep[ZSTD_REP_NUM];
166 U32 litSum; /* nb of literals */
167 U32 litLengthSum; /* nb of litLength codes */
168 U32 matchLengthSum; /* nb of matchLength codes */
169 U32 offCodeSum; /* nb of offset codes */
170 U32 litSumBasePrice; /* to compare to log2(litfreq) */
171 U32 litLengthSumBasePrice; /* to compare to log2(llfreq) */
172 U32 matchLengthSumBasePrice;/* to compare to log2(mlfreq) */
173 U32 offCodeSumBasePrice; /* to compare to log2(offreq) */
181 U32 rep[ZSTD_REP_NUM];
188 U32 dictLimit; /* below that point, need extDict */
189 U32 lowLimit; /* below that point, no more valid data */
190 U32 nbOverflowCorrections; /* Number of times overflow correction has run since
204 U32 loadedDictEnd; /* index of end of dictionary, within context's referential.
211 U32 nextToUpdate; /* index from which to continue table update */
212 … U32 hashLog3; /* dispatch table for matches of len==3 : larger == faster, more memory */
214 …U32 rowHashLog; /* For row-based matchfinder: Hashlog based on nb of rows…
216 …U32 hashCache[ZSTD_ROW_HASH_CACHE_SIZE]; /* For row-based matchFinder: a cache of hashes to improv…
218 U32* hashTable;
219 U32* hashTable3;
220 U32* chainTable;
222 …U32 forceNonContiguous; /* Non-zero if we should force non-contiguous load for the next window upd…
240 U32 offset;
241 U32 checksum;
246 U32 hash;
247 U32 checksum;
256 U32 loadedDictEnd;
264 U32 hashLog; /* Log size of hashTable */
265 U32 bucketSizeLog; /* Log bucket size for collision resolution, at most 8 */
266 U32 minMatchLength; /* Minimum match length */
267 U32 hashRateLog; /* Log number of entries to skip */
268 U32 windowLog; /* Window log for the LDM */
354 U32 partitions[ZSTD_MAX_NB_BLOCK_SPLITS];
365 U32 dictID;
387 U32* entropyWorkspace; /* entropy workspace of ENTROPY_WORKSPACE_SIZE bytes */
403 U32 frameEnded;
452 ZSTD_matchState_t* bs, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
457 MEM_STATIC U32 ZSTD_LLcode(U32 litLength) in ZSTD_LLcode()
467 static const U32 LL_deltaCode = 19; in ZSTD_LLcode()
474 MEM_STATIC U32 ZSTD_MLcode(U32 mlBase) in ZSTD_MLcode()
484 static const U32 ML_deltaCode = 36; in ZSTD_MLcode()
503 …STD_noCompressBlock (void* dst, size_t dstCapacity, const void* src, size_t srcSize, U32 lastBlock) in ZSTD_noCompressBlock()
505 U32 const cBlockHeader24 = lastBlock + (((U32)bt_raw)<<1) + (U32)(srcSize << 3); in ZSTD_noCompressBlock()
513 …ze_t ZSTD_rleCompressBlock (void* dst, size_t dstCapacity, BYTE src, size_t srcSize, U32 lastBlock) in ZSTD_rleCompressBlock()
516 U32 const cBlockHeader = lastBlock + (((U32)bt_rle)<<1) + (U32)(srcSize << 3); in ZSTD_rleCompressBlock()
530 U32 const minlog = (strat>=ZSTD_btultra) ? (U32)(strat) - 1 : 6; in ZSTD_minGain()
590 U32 offBase_minus1, in ZSTD_storeSeq()
598 { U32 const pos = (U32)((const BYTE*)literals - g_start); in ZSTD_storeSeq()
600 pos, (U32)litLength, (U32)matchLength, (U32)offBase_minus1); in ZSTD_storeSeq()
626 seqStorePtr->longLengthPos = (U32)(seqStorePtr->sequences - seqStorePtr->sequencesStart); in ZSTD_storeSeq()
639 … seqStorePtr->longLengthPos = (U32)(seqStorePtr->sequences - seqStorePtr->sequencesStart); in ZSTD_storeSeq()
652 ZSTD_updateRep(U32 rep[ZSTD_REP_NUM], U32 const offBase_minus1, U32 const ll0) in ZSTD_updateRep()
659 U32 const repCode = STORED_REPCODE(offBase_minus1) - 1 + ll0; in ZSTD_updateRep()
661 U32 const currentOffset = (repCode==ZSTD_REP_NUM) ? (rep[0] - 1) : rep[repCode]; in ZSTD_updateRep()
672 U32 rep[3];
676 ZSTD_newRep(U32 const rep[ZSTD_REP_NUM], U32 const offBase_minus1, U32 const ll0) in ZSTD_newRep()
707 return (__builtin_ctz((U32)val) >> 3); in ZSTD_NbCommonBytes()
713 return DeBruijnBytePos[((U32)((val & -(S32)val) * 0x077CB531U)) >> 27]; in ZSTD_NbCommonBytes()
730 return (__builtin_clz((U32)val) >> 3); in ZSTD_NbCommonBytes()
785 static const U32 prime3bytes = 506832829U;
786 static U32 ZSTD_hash3(U32 u, U32 h) { return ((u << (32-24)) * prime3bytes) >> (32-h) ; } in ZSTD_hash3()
787 MEM_STATIC size_t ZSTD_hash3Ptr(const void* ptr, U32 h) { return ZSTD_hash3(MEM_readLE32(ptr), h); … in ZSTD_hash3Ptr()
789 static const U32 prime4bytes = 2654435761U;
790 static U32 ZSTD_hash4(U32 u, U32 h) { return (u * prime4bytes) >> (32-h) ; } in ZSTD_hash4()
791 static size_t ZSTD_hash4Ptr(const void* ptr, U32 h) { return ZSTD_hash4(MEM_read32(ptr), h); } in ZSTD_hash4Ptr()
794 static size_t ZSTD_hash5(U64 u, U32 h) { return (size_t)(((u << (64-40)) * prime5bytes) >> (64-h))… in ZSTD_hash5()
795 static size_t ZSTD_hash5Ptr(const void* p, U32 h) { return ZSTD_hash5(MEM_readLE64(p), h); } in ZSTD_hash5Ptr()
798 static size_t ZSTD_hash6(U64 u, U32 h) { return (size_t)(((u << (64-48)) * prime6bytes) >> (64-h))… in ZSTD_hash6()
799 static size_t ZSTD_hash6Ptr(const void* p, U32 h) { return ZSTD_hash6(MEM_readLE64(p), h); } in ZSTD_hash6Ptr()
802 static size_t ZSTD_hash7(U64 u, U32 h) { return (size_t)(((u << (64-56)) * prime7bytes) >> (64-h))… in ZSTD_hash7()
803 static size_t ZSTD_hash7Ptr(const void* p, U32 h) { return ZSTD_hash7(MEM_readLE64(p), h); } in ZSTD_hash7Ptr()
806 static size_t ZSTD_hash8(U64 u, U32 h) { return (size_t)(((u) * prime8bytes) >> (64-h)) ; } in ZSTD_hash8()
807 static size_t ZSTD_hash8Ptr(const void* p, U32 h) { return ZSTD_hash8(MEM_readLE64(p), h); } in ZSTD_hash8Ptr()
810 size_t ZSTD_hashPtr(const void* p, U32 hBits, U32 mls) in ZSTD_hashPtr()
865 MEM_STATIC U64 ZSTD_rollingHash_primePower(U32 length) in ZSTD_rollingHash_primePower()
891 ( ((U32)-1) /* Maximum ending current index */ \
901 U32 const end = (U32)endT; in ZSTD_window_clear()
907 MEM_STATIC U32 ZSTD_window_isEmpty(ZSTD_window_t const window) in ZSTD_window_isEmpty()
918 MEM_STATIC U32 ZSTD_window_hasExtDict(ZSTD_window_t const window) in ZSTD_window_hasExtDict()
954 MEM_STATIC U32 ZSTD_window_canOverflowCorrect(ZSTD_window_t const window, in ZSTD_window_canOverflowCorrect()
955 U32 cycleLog, in ZSTD_window_canOverflowCorrect()
956 U32 maxDist, in ZSTD_window_canOverflowCorrect()
957 U32 loadedDictEnd, in ZSTD_window_canOverflowCorrect()
960 U32 const cycleSize = 1u << cycleLog; in ZSTD_window_canOverflowCorrect()
961 U32 const curr = (U32)((BYTE const*)src - window.base); in ZSTD_window_canOverflowCorrect()
962 U32 const minIndexToOverflowCorrect = cycleSize in ZSTD_window_canOverflowCorrect()
971 U32 const adjustment = window.nbOverflowCorrections + 1; in ZSTD_window_canOverflowCorrect()
972 U32 const adjustedIndex = MAX(minIndexToOverflowCorrect * adjustment, in ZSTD_window_canOverflowCorrect()
974 U32 const indexLargeEnough = curr > adjustedIndex; in ZSTD_window_canOverflowCorrect()
979 U32 const dictionaryInvalidated = curr > maxDist + loadedDictEnd; in ZSTD_window_canOverflowCorrect()
989 MEM_STATIC U32 ZSTD_window_needOverflowCorrection(ZSTD_window_t const window, in ZSTD_window_needOverflowCorrection()
990 U32 cycleLog, in ZSTD_window_needOverflowCorrection()
991 U32 maxDist, in ZSTD_window_needOverflowCorrection()
992 U32 loadedDictEnd, in ZSTD_window_needOverflowCorrection()
996 U32 const curr = (U32)((BYTE const*)srcEnd - window.base); in ZSTD_window_needOverflowCorrection()
1014 MEM_STATIC U32 ZSTD_window_correctOverflow(ZSTD_window_t* window, U32 cycleLog, in ZSTD_window_correctOverflow()
1015 U32 maxDist, void const* src) in ZSTD_window_correctOverflow()
1036 U32 const cycleSize = 1u << cycleLog; in ZSTD_window_correctOverflow()
1037 U32 const cycleMask = cycleSize - 1; in ZSTD_window_correctOverflow()
1038 U32 const curr = (U32)((BYTE const*)src - window->base); in ZSTD_window_correctOverflow()
1039 U32 const currentCycle = curr & cycleMask; in ZSTD_window_correctOverflow()
1041 U32 const currentCycleCorrection = currentCycle < ZSTD_WINDOW_START_INDEX in ZSTD_window_correctOverflow()
1044 U32 const newCurrent = currentCycle in ZSTD_window_correctOverflow()
1047 U32 const correction = curr - newCurrent; in ZSTD_window_correctOverflow()
1113 U32 maxDist, in ZSTD_window_enforceMaxDist()
1114 U32* loadedDictEndPtr, in ZSTD_window_enforceMaxDist()
1117 U32 const blockEndIdx = (U32)((BYTE const*)blockEnd - window->base); in ZSTD_window_enforceMaxDist()
1118 U32 const loadedDictEnd = (loadedDictEndPtr != NULL) ? *loadedDictEndPtr : 0; in ZSTD_window_enforceMaxDist()
1136 U32 const newLowLimit = blockEndIdx - maxDist; in ZSTD_window_enforceMaxDist()
1158 U32 maxDist, in ZSTD_checkDictValidity()
1159 U32* loadedDictEndPtr, in ZSTD_checkDictValidity()
1164 { U32 const blockEndIdx = (U32)((BYTE const*)blockEnd - window->base); in ZSTD_checkDictValidity()
1165 U32 const loadedDictEnd = *loadedDictEndPtr; in ZSTD_checkDictValidity()
1202 MEM_STATIC U32 ZSTD_window_update(ZSTD_window_t* window, in ZSTD_window_update()
1207 U32 contiguous = 1; in ZSTD_window_update()
1219 assert(distanceFromBase == (size_t)(U32)distanceFromBase); /* should never overflow */ in ZSTD_window_update()
1220 window->dictLimit = (U32)distanceFromBase; in ZSTD_window_update()
1232 …U32 const lowLimitMax = (highInputIdx > (ptrdiff_t)window->dictLimit) ? window->dictLimit : (U32)h… in ZSTD_window_update()
1242 MEM_STATIC U32 ZSTD_getLowestMatchIndex(const ZSTD_matchState_t* ms, U32 curr, unsigned windowLog) in ZSTD_getLowestMatchIndex()
1244 U32 const maxDistance = 1U << windowLog; in ZSTD_getLowestMatchIndex()
1245 U32 const lowestValid = ms->window.lowLimit; in ZSTD_getLowestMatchIndex()
1246 U32 const withinWindow = (curr - lowestValid > maxDistance) ? curr - maxDistance : lowestValid; in ZSTD_getLowestMatchIndex()
1247 U32 const isDictionary = (ms->loadedDictEnd != 0); in ZSTD_getLowestMatchIndex()
1252 U32 const matchLowest = isDictionary ? lowestValid : withinWindow; in ZSTD_getLowestMatchIndex()
1259 MEM_STATIC U32 ZSTD_getLowestPrefixIndex(const ZSTD_matchState_t* ms, U32 curr, unsigned windowLog) in ZSTD_getLowestPrefixIndex()
1261 U32 const maxDistance = 1U << windowLog; in ZSTD_getLowestPrefixIndex()
1262 U32 const lowestValid = ms->window.dictLimit; in ZSTD_getLowestPrefixIndex()
1263 … U32 const withinWindow = (curr - lowestValid > maxDistance) ? curr - maxDistance : lowestValid; in ZSTD_getLowestPrefixIndex()
1264 U32 const isDictionary = (ms->loadedDictEnd != 0); in ZSTD_getLowestPrefixIndex()
1268 U32 const matchLowest = isDictionary ? lowestValid : withinWindow; in ZSTD_getLowestPrefixIndex()
1277 MEM_STATIC double ZSTD_fWeight(U32 rawStat) in ZSTD_fWeight()
1279 U32 const fp_accuracy = 8; in ZSTD_fWeight()
1280 U32 const fp_multiplier = (1 << fp_accuracy); in ZSTD_fWeight()
1281 U32 const newStat = rawStat + 1; in ZSTD_fWeight()
1282 U32 const hb = ZSTD_highbit32(newStat); in ZSTD_fWeight()
1283 U32 const BWeight = hb * fp_multiplier; in ZSTD_fWeight()
1284 U32 const FWeight = (newStat << fp_accuracy) >> hb; in ZSTD_fWeight()
1285 U32 const weight = BWeight + FWeight; in ZSTD_fWeight()
1292 MEM_STATIC void ZSTD_debugTable(const U32* table, U32 max) in ZSTD_debugTable()
1392 U32 ZSTD_cycleLog(U32 hashLog, ZSTD_strategy strat);