Lines Matching refs:U32
88 static U32 LZ4HC_hashPtr(const void* ptr) { return HASH_FUNCTION(LZ4_read32(ptr)); }
110 hc4->nextToUpdate = (U32)newStartingOffset;
114 hc4->dictLimit = (U32)newStartingOffset;
115 hc4->lowLimit = (U32)newStartingOffset;
123 U32* const hashTable = hc4->hashTable;
125 U32 const prefixIdx = hc4->dictLimit;
126 U32 const target = (U32)(ip - prefixPtr) + prefixIdx;
127 U32 idx = hc4->nextToUpdate;
132 U32 const h = LZ4HC_hashPtr(prefixPtr+idx-prefixIdx);
167 static U32 LZ4HC_rotatePattern(size_t const rotate, U32 const pattern)
177 LZ4HC_countPattern(const BYTE* ip, const BYTE* const iEnd, U32 const pattern32)
196 U32 bitOffset = (sizeof(pattern)*8) - 8;
210 LZ4HC_reverseCountPattern(const BYTE* ip, const BYTE* const iLow, U32 pattern)
231 static int LZ4HC_protectDictEnd(U32 const dictLimit, U32 const matchIndex)
233 return ((U32)((dictLimit - 1) - matchIndex) >= 3);
253 U32* const HashTable = hc4->hashTable;
256 const U32 prefixIdx = hc4->dictLimit;
257 const U32 ipIndex = (U32)(ip - prefixPtr) + prefixIdx;
259 const U32 lowestMatchIndex = (withinStartDistance) ? hc4->lowLimit : ipIndex - LZ4_DISTANCE_MAX;
261 const U32 dictIdx = hc4->lowLimit;
265 U32 matchChainPos = 0;
266 U32 const pattern = LZ4_read32(ip);
267 U32 matchIndex;
319 if (matchIndex + (U32)longest <= ipIndex) {
321 U32 distanceToNextMatch = 1;
327 U32 const candidateDist = DELTANEXTU16(chainTable, matchIndex + (U32)pos);
331 matchChainPos = (U32)pos;
340 { U32 const distNextMatch = DELTANEXTU16(chainTable, matchIndex);
342 U32 const matchCandidateIdx = matchIndex-1;
360 U32 const rotatedPattern = LZ4HC_rotatePattern(forwardPatternLength, pattern);
369 U32 const rotatedPattern = LZ4HC_rotatePattern((U32)(-(int)backLength), pattern);
373 backLength = matchCandidateIdx - MAX(matchCandidateIdx - (U32)backLength, lowestMatchIndex);
379 U32 const newMatchIndex = matchCandidateIdx + (U32)forwardPatternLength - (U32)srcPatternLength; /* best position, full pattern, might be followed by more match */
388 U32 const newMatchIndex = matchCandidateIdx - (U32)backLength; /* farthest position in current segment, will find a match of length currentSegmentLength + maybe some back */
404 { U32 const distToNextPattern = DELTANEXTU16(chainTable, matchIndex);
421 U32 dictMatchIndex = dictCtx->hashTable[LZ4HC_hashPtr(ip)];
423 matchIndex = dictMatchIndex + lowestMatchIndex - (U32)dictEndOffset;
441 { U32 const nextOffset = DELTANEXTU16(dictCtx->chainTable, dictMatchIndex);
485 static U32 totalCost = 0;
486 U32 const pos = (start==NULL) ? 0 : (U32)(anchor - start);
487 U32 const ll = (U32)(ip - anchor);
488 U32 const llAdd = (ll>=15) ? ((ll-15) / 255) + 1 : 0;
489 U32 const mlAdd = (matchLength>=19) ? ((matchLength-19) / 255) + 1 : 0;
490 U32 const cost = 1 + llAdd + ll + 2 + mlAdd;
495 (U32)(ip - anchor), matchLength, (U32)(ip-match),
815 U32 targetLength;
837 if ((U32)*srcSizePtr > (U32)LZ4_MAX_INPUT_SIZE) return 0; /* Unsupported input size (too large or negative) */
1102 ctxPtr->dictLimit += (U32)(ctxPtr->end - ctxPtr->prefixStart);
1141 ctxPtr->lowLimit += (U32)(sourceEnd - ctxPtr->dictStart);
1142 ctxPtr->dictStart += (U32)(sourceEnd - ctxPtr->dictStart);
1183 { U32 const endIndex = (U32)(streamPtr->end - streamPtr->prefixStart) + streamPtr->dictLimit;
1186 streamPtr->dictLimit = endIndex - (U32)dictSize;
1187 streamPtr->lowLimit = endIndex - (U32)dictSize;
1500 assert((U32)favorDecSpeed <= 1);