Lines Matching refs:hc4

94 static void LZ4HC_clearTables (LZ4HC_CCtx_internal* hc4)
96 MEM_INIT(hc4->hashTable, 0, sizeof(hc4->hashTable));
97 MEM_INIT(hc4->chainTable, 0xFF, sizeof(hc4->chainTable));
100 static void LZ4HC_init_internal (LZ4HC_CCtx_internal* hc4, const BYTE* start)
102 size_t const bufferSize = (size_t)(hc4->end - hc4->prefixStart);
103 size_t newStartingOffset = bufferSize + hc4->dictLimit;
106 LZ4HC_clearTables(hc4);
110 hc4->nextToUpdate = (U32)newStartingOffset;
111 hc4->prefixStart = start;
112 hc4->end = start;
113 hc4->dictStart = start;
114 hc4->dictLimit = (U32)newStartingOffset;
115 hc4->lowLimit = (U32)newStartingOffset;
120 LZ4_FORCE_INLINE void LZ4HC_Insert (LZ4HC_CCtx_internal* hc4, const BYTE* ip)
122 U16* const chainTable = hc4->chainTable;
123 U32* const hashTable = hc4->hashTable;
124 const BYTE* const prefixPtr = hc4->prefixStart;
125 U32 const prefixIdx = hc4->dictLimit;
127 U32 idx = hc4->nextToUpdate;
140 hc4->nextToUpdate = target;
241 LZ4HC_CCtx_internal* const hc4,
252 U16* const chainTable = hc4->chainTable;
253 U32* const HashTable = hc4->hashTable;
254 const LZ4HC_CCtx_internal * const dictCtx = hc4->dictCtx;
255 const BYTE* const prefixPtr = hc4->prefixStart;
256 const U32 prefixIdx = hc4->dictLimit;
258 const int withinStartDistance = (hc4->lowLimit + (LZ4_DISTANCE_MAX + 1) > ipIndex);
259 const U32 lowestMatchIndex = (withinStartDistance) ? hc4->lowLimit : ipIndex - LZ4_DISTANCE_MAX;
260 const BYTE* const dictStart = hc4->dictStart;
261 const U32 dictIdx = hc4->lowLimit;
273 LZ4HC_Insert(hc4, ip);
450 LZ4HC_InsertAndFindBestMatch(LZ4HC_CCtx_internal* const hc4, /* Index table will be updated */
461 return LZ4HC_InsertAndGetWiderMatch(hc4, ip, ip, iLimit, MINMATCH-1, matchpos, &uselessPtr, maxNbAttempts, patternAnalysis, 0 /*chainSwap*/, dict, favorCompressionRatio);
1222 LZ4_streamHC_t* const hc4 = LZ4_initStreamHC(state, sizeof(*hc4));
1223 if (hc4 == NULL) return 1; /* init failed */
1224 LZ4HC_init_internal (&hc4->internal_donotuse, (const BYTE*)inputBuffer);
1231 LZ4_streamHC_t* const hc4 = LZ4_createStreamHC();
1232 if (hc4 == NULL) return NULL; /* not enough memory */
1233 LZ4HC_init_internal (&hc4->internal_donotuse, (const BYTE*)inputBuffer);
1234 return hc4;