Lines Matching refs:ip
111 FORCE_INLINE void LZ4HC_Insert (LZ4HC_CCtx_internal* hc4, const BYTE* ip) in LZ4HC_Insert() argument
116 U32 const target = (U32)(ip - base); in LZ4HC_Insert()
133 const BYTE* ip, const BYTE* const iLimit, in LZ4HC_InsertAndFindBestMatch() argument
142 …const U32 lowLimit = (hc4->lowLimit + 64 KB > (U32)(ip-base)) ? hc4->lowLimit : (U32)(ip - base) -… in LZ4HC_InsertAndFindBestMatch()
148 LZ4HC_Insert(hc4, ip); in LZ4HC_InsertAndFindBestMatch()
149 matchIndex = HashTable[LZ4HC_hashPtr(ip)]; in LZ4HC_InsertAndFindBestMatch()
155 if (*(match+ml) == *(ip+ml) in LZ4HC_InsertAndFindBestMatch()
156 && (LZ4_read32(match) == LZ4_read32(ip))) in LZ4HC_InsertAndFindBestMatch()
158 size_t const mlt = LZ4_count(ip+MINMATCH, match+MINMATCH, iLimit) + MINMATCH; in LZ4HC_InsertAndFindBestMatch()
163 if (LZ4_read32(match) == LZ4_read32(ip)) { in LZ4HC_InsertAndFindBestMatch()
165 const BYTE* vLimit = ip + (dictLimit - matchIndex); in LZ4HC_InsertAndFindBestMatch()
167 mlt = LZ4_count(ip+MINMATCH, match+MINMATCH, vLimit) + MINMATCH; in LZ4HC_InsertAndFindBestMatch()
168 if ((ip+mlt == vLimit) && (vLimit < iLimit)) in LZ4HC_InsertAndFindBestMatch()
169 mlt += LZ4_count(ip+mlt, base+dictLimit, iLimit); in LZ4HC_InsertAndFindBestMatch()
182 const BYTE* const ip, in LZ4HC_InsertAndGetWiderMatch() argument
195 …const U32 lowLimit = (hc4->lowLimit + 64 KB > (U32)(ip-base)) ? hc4->lowLimit : (U32)(ip - base) -… in LZ4HC_InsertAndGetWiderMatch()
199 int delta = (int)(ip-iLowLimit); in LZ4HC_InsertAndGetWiderMatch()
203 LZ4HC_Insert(hc4, ip); in LZ4HC_InsertAndGetWiderMatch()
204 matchIndex = HashTable[LZ4HC_hashPtr(ip)]; in LZ4HC_InsertAndGetWiderMatch()
211 if (LZ4_read32(matchPtr) == LZ4_read32(ip)) { in LZ4HC_InsertAndGetWiderMatch()
212 int mlt = MINMATCH + LZ4_count(ip+MINMATCH, matchPtr+MINMATCH, iHighLimit); in LZ4HC_InsertAndGetWiderMatch()
215 while ((ip+back > iLowLimit) in LZ4HC_InsertAndGetWiderMatch()
217 && (ip[back-1] == matchPtr[back-1])) in LZ4HC_InsertAndGetWiderMatch()
225 *startpos = ip+back; in LZ4HC_InsertAndGetWiderMatch()
231 if (LZ4_read32(matchPtr) == LZ4_read32(ip)) { in LZ4HC_InsertAndGetWiderMatch()
234 const BYTE* vLimit = ip + (dictLimit - matchIndex); in LZ4HC_InsertAndGetWiderMatch()
236 mlt = LZ4_count(ip+MINMATCH, matchPtr+MINMATCH, vLimit) + MINMATCH; in LZ4HC_InsertAndGetWiderMatch()
237 if ((ip+mlt == vLimit) && (vLimit < iHighLimit)) in LZ4HC_InsertAndGetWiderMatch()
238 mlt += LZ4_count(ip+mlt, base+dictLimit, iHighLimit); in LZ4HC_InsertAndGetWiderMatch()
239 …while ((ip+back > iLowLimit) && (matchIndex+back > lowLimit) && (ip[back-1] == matchPtr[back-1])) … in LZ4HC_InsertAndGetWiderMatch()
241 …t)mlt > longest) { longest = (int)mlt; *matchpos = base + matchIndex + back; *startpos = ip+back; } in LZ4HC_InsertAndGetWiderMatch()
259 const BYTE** ip, in LZ4HC_encodeSequence() argument
271 …teral : %u -- match : %u -- offset : %u\n", (U32)(*ip - *anchor), (U32)matchLength, (U32)(*ip-… in LZ4HC_encodeSequence()
275 length = (int)(*ip - *anchor); in LZ4HC_encodeSequence()
286 LZ4_writeLE16(*op, (U16)(*ip-match)); *op += 2; in LZ4HC_encodeSequence()
302 *ip += matchLength; in LZ4HC_encodeSequence()
303 *anchor = *ip; in LZ4HC_encodeSequence()
320 const BYTE* ip = (const BYTE*) source; in LZ4HC_compress_hashChain() local
321 const BYTE* anchor = ip; in LZ4HC_compress_hashChain()
322 const BYTE* const iend = ip + inputSize; in LZ4HC_compress_hashChain()
341 ip++; in LZ4HC_compress_hashChain()
344 while (ip < mflimit) { in LZ4HC_compress_hashChain()
345 ml = LZ4HC_InsertAndFindBestMatch (ctx, ip, matchlimit, (&ref), maxNbAttempts); in LZ4HC_compress_hashChain()
346 if (!ml) { ip++; continue; } in LZ4HC_compress_hashChain()
349 start0 = ip; in LZ4HC_compress_hashChain()
354 if (ip+ml < mflimit) in LZ4HC_compress_hashChain()
355 …ml2 = LZ4HC_InsertAndGetWiderMatch(ctx, ip + ml - 2, ip + 0, matchlimit, ml, &ref2, &start2, maxNb… in LZ4HC_compress_hashChain()
359 if (LZ4HC_encodeSequence(&ip, &op, &anchor, ml, ref, limit, oend)) return 0; in LZ4HC_compress_hashChain()
363 if (start0 < ip) { in LZ4HC_compress_hashChain()
364 if (start2 < ip + ml0) { /* empirical */ in LZ4HC_compress_hashChain()
365 ip = start0; in LZ4HC_compress_hashChain()
372 if ((start2 - ip) < 3) { /* First Match too small : removed */ in LZ4HC_compress_hashChain()
374 ip = start2; in LZ4HC_compress_hashChain()
385 if ((start2 - ip) < OPTIMAL_ML) { in LZ4HC_compress_hashChain()
389 if (ip+new_ml > start2 + ml2 - MINMATCH) new_ml = (int)(start2 - ip) + ml2 - MINMATCH; in LZ4HC_compress_hashChain()
390 correction = new_ml - (int)(start2 - ip); in LZ4HC_compress_hashChain()
405 if (start2 < ip+ml) ml = (int)(start2 - ip); in LZ4HC_compress_hashChain()
407 if (LZ4HC_encodeSequence(&ip, &op, &anchor, ml, ref, limit, oend)) return 0; in LZ4HC_compress_hashChain()
408 ip = start2; in LZ4HC_compress_hashChain()
409 if (LZ4HC_encodeSequence(&ip, &op, &anchor, ml2, ref2, limit, oend)) return 0; in LZ4HC_compress_hashChain()
413 if (start3 < ip+ml+3) { /* Not enough space for match 2 : remove it */ in LZ4HC_compress_hashChain()
414 …if (start3 >= (ip+ml)) { /* can write Seq1 immediately ==> Seq2 is removed, so Seq3 becomes Seq1 … in LZ4HC_compress_hashChain()
415 if (start2 < ip+ml) { in LZ4HC_compress_hashChain()
416 int correction = (int)(ip+ml - start2); in LZ4HC_compress_hashChain()
427 if (LZ4HC_encodeSequence(&ip, &op, &anchor, ml, ref, limit, oend)) return 0; in LZ4HC_compress_hashChain()
428 ip = start3; in LZ4HC_compress_hashChain()
448 if (start2 < ip+ml) { in LZ4HC_compress_hashChain()
449 if ((start2 - ip) < (int)ML_MASK) { in LZ4HC_compress_hashChain()
452 if (ip + ml > start2 + ml2 - MINMATCH) ml = (int)(start2 - ip) + ml2 - MINMATCH; in LZ4HC_compress_hashChain()
453 correction = ml - (int)(start2 - ip); in LZ4HC_compress_hashChain()
460 ml = (int)(start2 - ip); in LZ4HC_compress_hashChain()
463 if (LZ4HC_encodeSequence(&ip, &op, &anchor, ml, ref, limit, oend)) return 0; in LZ4HC_compress_hashChain()
465 ip = start2; in LZ4HC_compress_hashChain()