Lines Matching refs:U32

84     U32 offBase;   /* offBase == Offset + ZSTD_REP_NUM, or repcode 1,2,3 */
112U32 longLengthPos; /* Index of the sequence to apply long length modification t…
116 U32 litLength;
117 U32 matchLength;
129 if (seqStore->longLengthPos == (U32)(seq - seqStore->sequencesStart)) { in ZSTD_getSequenceLength()
193 U32 off; /* Offset sumtype code for the match, using ZSTD_storeSeq() format */
194 U32 len; /* Raw length of match */
198 U32 offset; /* Offset of sequence */
199 U32 litLength; /* Length of literals prior to match */
200 U32 matchLength; /* Raw length of match */
216 U32 off; /* offset of previous match */
217 U32 mlen; /* length of previous match */
218 U32 litlen; /* nb of literals since previous match */
219 U32 rep[ZSTD_REP_NUM]; /* offset history after previous match */
234 U32 litSum; /* nb of literals */
235 U32 litLengthSum; /* nb of litLength codes */
236 U32 matchLengthSum; /* nb of matchLength codes */
237 U32 offCodeSum; /* nb of offset codes */
238 U32 litSumBasePrice; /* to compare to log2(litfreq) */
239 U32 litLengthSumBasePrice; /* to compare to log2(llfreq) */
240 U32 matchLengthSumBasePrice;/* to compare to log2(mlfreq) */
241 U32 offCodeSumBasePrice; /* to compare to log2(offreq) */
249 U32 rep[ZSTD_REP_NUM];
256 U32 dictLimit; /* below that point, need extDict */
257 U32 lowLimit; /* below that point, no more valid data */
258 U32 nbOverflowCorrections; /* Number of times overflow correction has run since
272 U32 loadedDictEnd; /* index of end of dictionary, within context's referential.
279 U32 nextToUpdate; /* index from which to continue table update */
280U32 hashLog3; /* dispatch table for matches of len==3 : larger == faster, more memory */
282U32 rowHashLog; /* For row-based matchfinder: Hashlog based on nb of rows…
284U32 hashCache[ZSTD_ROW_HASH_CACHE_SIZE]; /* For row-based matchFinder: a cache of hashes to improv…
286U32 hashSaltEntropy; /* For row-based matchFinder: collects entropy for salt g…
288 U32* hashTable;
289 U32* hashTable3;
290 U32* chainTable;
322 U32 offset;
323 U32 checksum;
328 U32 hash;
329 U32 checksum;
338 U32 loadedDictEnd;
346 U32 hashLog; /* Log size of hashTable */
347 U32 bucketSizeLog; /* Log bucket size for collision resolution, at most 8 */
348 U32 minMatchLength; /* Minimum match length */
349 U32 hashRateLog; /* Log number of entries to skip */
350 U32 windowLog; /* Window log for the LDM */
466 U32 partitions[ZSTD_MAX_NB_BLOCK_SPLITS];
477 U32 dictID;
516 U32 frameEnded;
571 ZSTD_MatchState_t* bs, SeqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
576 MEM_STATIC U32 ZSTD_LLcode(U32 litLength) in ZSTD_LLcode()
586 static const U32 LL_deltaCode = 19; in ZSTD_LLcode()
593 MEM_STATIC U32 ZSTD_MLcode(U32 mlBase) in ZSTD_MLcode()
603 static const U32 ML_deltaCode = 36; in ZSTD_MLcode()
623 ZSTD_selectAddr(U32 index, U32 lowLimit, const BYTE* candidate, const BYTE* backup) in ZSTD_selectAddr()
642 ZSTD_noCompressBlock(void* dst, size_t dstCapacity, const void* src, size_t srcSize, U32 lastBlock) in ZSTD_noCompressBlock()
644 U32 const cBlockHeader24 = lastBlock + (((U32)bt_raw)<<1) + (U32)(srcSize << 3); in ZSTD_noCompressBlock()
654 ZSTD_rleCompressBlock(void* dst, size_t dstCapacity, BYTE src, size_t srcSize, U32 lastBlock) in ZSTD_rleCompressBlock()
657 U32 const cBlockHeader = lastBlock + (((U32)bt_rle)<<1) + (U32)(srcSize << 3); in ZSTD_rleCompressBlock()
671 U32 const minlog = (strat>=ZSTD_btultra) ? (U32)(strat) - 1 : 6; in ZSTD_minGain()
729 U32 offBase, in ZSTD_storeSeqOnly()
739 seqStorePtr->longLengthPos = (U32)(seqStorePtr->sequences - seqStorePtr->sequencesStart); in ZSTD_storeSeqOnly()
753 … seqStorePtr->longLengthPos = (U32)(seqStorePtr->sequences - seqStorePtr->sequencesStart); in ZSTD_storeSeqOnly()
770 U32 offBase, in ZSTD_storeSeq()
778 { U32 const pos = (U32)((const BYTE*)literals - g_start); in ZSTD_storeSeq()
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()
817 U32 const repCode = OFFBASE_TO_REPCODE(offBase) - 1 + ll0; in ZSTD_updateRep()
819 U32 const currentOffset = (repCode==ZSTD_REP_NUM) ? (rep[0] - 1) : rep[repCode]; in ZSTD_updateRep()
830 U32 rep[3];
834 ZSTD_newRep(U32 const rep[ZSTD_REP_NUM], U32 const offBase, U32 const ll0) in ZSTD_newRep()
890 static const U32 prime3bytes = 506832829U;
891 static U32 ZSTD_hash3(U32 u, U32 h, U32 s) { assert(h <= 32); return (((u << (32-24)) * prime3by… in ZSTD_hash3()
892 MEM_STATIC size_t ZSTD_hash3Ptr(const void* ptr, U32 h) { return ZSTD_hash3(MEM_readLE32(ptr), h, 0… in ZSTD_hash3Ptr()
893 MEM_STATIC size_t ZSTD_hash3PtrS(const void* ptr, U32 h, U32 s) { return ZSTD_hash3(MEM_readLE32(pt… in ZSTD_hash3PtrS()
895 static const U32 prime4bytes = 2654435761U;
896 static U32 ZSTD_hash4(U32 u, U32 h, U32 s) { assert(h <= 32); return ((u * prime4bytes) ^ s) >> … in ZSTD_hash4()
897 static size_t ZSTD_hash4Ptr(const void* ptr, U32 h) { return ZSTD_hash4(MEM_readLE32(ptr), h, 0); } in ZSTD_hash4Ptr()
898 static size_t ZSTD_hash4PtrS(const void* ptr, U32 h, U32 s) { return ZSTD_hash4(MEM_readLE32(ptr), … in ZSTD_hash4PtrS()
901 static size_t ZSTD_hash5(U64 u, U32 h, U64 s) { assert(h <= 64); return (size_t)((((u << (64-40)) … in ZSTD_hash5()
902 static size_t ZSTD_hash5Ptr(const void* p, U32 h) { return ZSTD_hash5(MEM_readLE64(p), h, 0); } in ZSTD_hash5Ptr()
903 static size_t ZSTD_hash5PtrS(const void* p, U32 h, U64 s) { return ZSTD_hash5(MEM_readLE64(p), h, s… in ZSTD_hash5PtrS()
906 static size_t ZSTD_hash6(U64 u, U32 h, U64 s) { assert(h <= 64); return (size_t)((((u << (64-48)) … in ZSTD_hash6()
907 static size_t ZSTD_hash6Ptr(const void* p, U32 h) { return ZSTD_hash6(MEM_readLE64(p), h, 0); } in ZSTD_hash6Ptr()
908 static size_t ZSTD_hash6PtrS(const void* p, U32 h, U64 s) { return ZSTD_hash6(MEM_readLE64(p), h, s… in ZSTD_hash6PtrS()
911 static size_t ZSTD_hash7(U64 u, U32 h, U64 s) { assert(h <= 64); return (size_t)((((u << (64-56)) … in ZSTD_hash7()
912 static size_t ZSTD_hash7Ptr(const void* p, U32 h) { return ZSTD_hash7(MEM_readLE64(p), h, 0); } in ZSTD_hash7Ptr()
913 static size_t ZSTD_hash7PtrS(const void* p, U32 h, U64 s) { return ZSTD_hash7(MEM_readLE64(p), h, s… in ZSTD_hash7PtrS()
916 static size_t ZSTD_hash8(U64 u, U32 h, U64 s) { assert(h <= 64); return (size_t)((((u) * prime8byte… in ZSTD_hash8()
917 static size_t ZSTD_hash8Ptr(const void* p, U32 h) { return ZSTD_hash8(MEM_readLE64(p), h, 0); } in ZSTD_hash8Ptr()
918 static size_t ZSTD_hash8PtrS(const void* p, U32 h, U64 s) { return ZSTD_hash8(MEM_readLE64(p), h, s… in ZSTD_hash8PtrS()
922 size_t ZSTD_hashPtr(const void* p, U32 hBits, U32 mls) in ZSTD_hashPtr()
940 size_t ZSTD_hashPtrSalted(const void* p, U32 hBits, U32 mls, const U64 hashSalt) { in ZSTD_hashPtrSalted()
948 case 4: return ZSTD_hash4PtrS(p, hBits, (U32)hashSalt); in ZSTD_hashPtrSalted()
999 MEM_STATIC U64 ZSTD_rollingHash_primePower(U32 length) in ZSTD_rollingHash_primePower()
1026 ( ((U32)-1) /* Maximum ending current index */ \
1036 U32 const end = (U32)endT; in ZSTD_window_clear()
1042 MEM_STATIC U32 ZSTD_window_isEmpty(ZSTD_window_t const window) in ZSTD_window_isEmpty()
1053 MEM_STATIC U32 ZSTD_window_hasExtDict(ZSTD_window_t const window) in ZSTD_window_hasExtDict()
1089 MEM_STATIC U32 ZSTD_window_canOverflowCorrect(ZSTD_window_t const window, in ZSTD_window_canOverflowCorrect()
1090 U32 cycleLog, in ZSTD_window_canOverflowCorrect()
1091 U32 maxDist, in ZSTD_window_canOverflowCorrect()
1092 U32 loadedDictEnd, in ZSTD_window_canOverflowCorrect()
1095 U32 const cycleSize = 1u << cycleLog; in ZSTD_window_canOverflowCorrect()
1096 U32 const curr = (U32)((BYTE const*)src - window.base); in ZSTD_window_canOverflowCorrect()
1097 U32 const minIndexToOverflowCorrect = cycleSize in ZSTD_window_canOverflowCorrect()
1106 U32 const adjustment = window.nbOverflowCorrections + 1; in ZSTD_window_canOverflowCorrect()
1107 U32 const adjustedIndex = MAX(minIndexToOverflowCorrect * adjustment, in ZSTD_window_canOverflowCorrect()
1109 U32 const indexLargeEnough = curr > adjustedIndex; in ZSTD_window_canOverflowCorrect()
1114 U32 const dictionaryInvalidated = curr > maxDist + loadedDictEnd; in ZSTD_window_canOverflowCorrect()
1124 MEM_STATIC U32 ZSTD_window_needOverflowCorrection(ZSTD_window_t const window, in ZSTD_window_needOverflowCorrection()
1125 U32 cycleLog, in ZSTD_window_needOverflowCorrection()
1126 U32 maxDist, in ZSTD_window_needOverflowCorrection()
1127 U32 loadedDictEnd, in ZSTD_window_needOverflowCorrection()
1131 U32 const curr = (U32)((BYTE const*)srcEnd - window.base); in ZSTD_window_needOverflowCorrection()
1151 U32 ZSTD_window_correctOverflow(ZSTD_window_t* window, U32 cycleLog, in ZSTD_window_correctOverflow()
1152 U32 maxDist, void const* src) in ZSTD_window_correctOverflow()
1173 U32 const cycleSize = 1u << cycleLog; in ZSTD_window_correctOverflow()
1174 U32 const cycleMask = cycleSize - 1; in ZSTD_window_correctOverflow()
1175 U32 const curr = (U32)((BYTE const*)src - window->base); in ZSTD_window_correctOverflow()
1176 U32 const currentCycle = curr & cycleMask; in ZSTD_window_correctOverflow()
1178 U32 const currentCycleCorrection = currentCycle < ZSTD_WINDOW_START_INDEX in ZSTD_window_correctOverflow()
1181 U32 const newCurrent = currentCycle in ZSTD_window_correctOverflow()
1184 U32 const correction = curr - newCurrent; in ZSTD_window_correctOverflow()
1250 U32 maxDist, in ZSTD_window_enforceMaxDist()
1251 U32* loadedDictEndPtr, in ZSTD_window_enforceMaxDist()
1254 U32 const blockEndIdx = (U32)((BYTE const*)blockEnd - window->base); in ZSTD_window_enforceMaxDist()
1255 U32 const loadedDictEnd = (loadedDictEndPtr != NULL) ? *loadedDictEndPtr : 0; in ZSTD_window_enforceMaxDist()
1273 U32 const newLowLimit = blockEndIdx - maxDist; in ZSTD_window_enforceMaxDist()
1295 U32 maxDist, in ZSTD_checkDictValidity()
1296 U32* loadedDictEndPtr, in ZSTD_checkDictValidity()
1301 { U32 const blockEndIdx = (U32)((BYTE const*)blockEnd - window->base); in ZSTD_checkDictValidity()
1302 U32 const loadedDictEnd = *loadedDictEndPtr; in ZSTD_checkDictValidity()
1346 U32 ZSTD_window_update(ZSTD_window_t* window, in ZSTD_window_update()
1351 U32 contiguous = 1; in ZSTD_window_update()
1363 assert(distanceFromBase == (size_t)(U32)distanceFromBase); /* should never overflow */ in ZSTD_window_update()
1364 window->dictLimit = (U32)distanceFromBase; in ZSTD_window_update()
1376U32 const lowLimitMax = (highInputIdx > (size_t)window->dictLimit) ? window->dictLimit : (U32)high… in ZSTD_window_update()
1387 MEM_STATIC U32 ZSTD_getLowestMatchIndex(const ZSTD_MatchState_t* ms, U32 curr, unsigned windowLog) in ZSTD_getLowestMatchIndex()
1389 U32 const maxDistance = 1U << windowLog; in ZSTD_getLowestMatchIndex()
1390 U32 const lowestValid = ms->window.lowLimit; in ZSTD_getLowestMatchIndex()
1391 U32 const withinWindow = (curr - lowestValid > maxDistance) ? curr - maxDistance : lowestValid; in ZSTD_getLowestMatchIndex()
1392 U32 const isDictionary = (ms->loadedDictEnd != 0); in ZSTD_getLowestMatchIndex()
1397 U32 const matchLowest = isDictionary ? lowestValid : withinWindow; in ZSTD_getLowestMatchIndex()
1404 MEM_STATIC U32 ZSTD_getLowestPrefixIndex(const ZSTD_MatchState_t* ms, U32 curr, unsigned windowLog) in ZSTD_getLowestPrefixIndex()
1406 U32 const maxDistance = 1U << windowLog; in ZSTD_getLowestPrefixIndex()
1407 U32 const lowestValid = ms->window.dictLimit; in ZSTD_getLowestPrefixIndex()
1408U32 const withinWindow = (curr - lowestValid > maxDistance) ? curr - maxDistance : lowestValid; in ZSTD_getLowestPrefixIndex()
1409 U32 const isDictionary = (ms->loadedDictEnd != 0); in ZSTD_getLowestPrefixIndex()
1413 U32 const matchLowest = isDictionary ? lowestValid : withinWindow; in ZSTD_getLowestPrefixIndex()
1421 MEM_STATIC int ZSTD_index_overlap_check(const U32 prefixLowestIndex, const U32 repIndex) { in ZSTD_index_overlap_check()
1422 return ((U32)((prefixLowestIndex-1) - repIndex) >= 3); in ZSTD_index_overlap_check()
1429 MEM_STATIC double ZSTD_fWeight(U32 rawStat) in ZSTD_fWeight()
1431 U32 const fp_accuracy = 8; in ZSTD_fWeight()
1432 U32 const fp_multiplier = (1 << fp_accuracy); in ZSTD_fWeight()
1433 U32 const newStat = rawStat + 1; in ZSTD_fWeight()
1434 U32 const hb = ZSTD_highbit32(newStat); in ZSTD_fWeight()
1435 U32 const BWeight = hb * fp_multiplier; in ZSTD_fWeight()
1436 U32 const FWeight = (newStat << fp_accuracy) >> hb; in ZSTD_fWeight()
1437 U32 const weight = BWeight + FWeight; in ZSTD_fWeight()
1444 MEM_STATIC void ZSTD_debugTable(const U32* table, U32 max) in ZSTD_debugTable()
1479 MEM_STATIC void ZSTD_writeTaggedIndex(U32* const hashTable, size_t hashAndTag, U32 index) { in ZSTD_writeTaggedIndex()
1481 U32 const tag = (U32)(hashAndTag & ZSTD_SHORT_CACHE_TAG_MASK); in ZSTD_writeTaggedIndex()
1489 U32 const tag1 = packedTag1 & ZSTD_SHORT_CACHE_TAG_MASK; in ZSTD_comparePackedTags()
1490 U32 const tag2 = packedTag2 & ZSTD_SHORT_CACHE_TAG_MASK; in ZSTD_comparePackedTags()
1510 U32 idx; /* Index in array of ZSTD_Sequence */
1511 U32 posInSequence; /* Position within sequence at idx */
1597 U32 ZSTD_cycleLog(U32 hashLog, ZSTD_strategy strat);