Lines Matching refs:ip

65 static inline void lz4hc_insert(struct lz4hc_data *hc4, const u8 *ip)  in lz4hc_insert()  argument
75 while (hc4->nexttoupdate < ip) { in lz4hc_insert()
122 const u8 *ip, const u8 *const matchlimit, const u8 **matchpos) in lz4hc_insertandfindbestmatch() argument
137 lz4hc_insert(hc4, ip); in lz4hc_insertandfindbestmatch()
138 ref = hashtable[HASH_VALUE(ip)] + base; in lz4hc_insertandfindbestmatch()
141 if (ref >= ip-4) { in lz4hc_insertandfindbestmatch()
143 if (A32(ref) == A32(ip)) { in lz4hc_insertandfindbestmatch()
144 delta = (u16)(ip-ref); in lz4hc_insertandfindbestmatch()
145 repl = ml = lz4hc_commonlength(ip + MINMATCH, in lz4hc_insertandfindbestmatch()
152 while ((ref >= ip - MAX_DISTANCE) && nbattempts) { in lz4hc_insertandfindbestmatch()
154 if (*(ref + ml) == *(ip + ml)) { in lz4hc_insertandfindbestmatch()
155 if (A32(ref) == A32(ip)) { in lz4hc_insertandfindbestmatch()
157 lz4hc_commonlength(ip + MINMATCH, in lz4hc_insertandfindbestmatch()
170 const BYTE *ptr = ip; in lz4hc_insertandfindbestmatch()
172 end = ip + repl - (MINMATCH-1); in lz4hc_insertandfindbestmatch()
191 const u8 *ip, const u8 *startlimit, const u8 *matchlimit, int longest, in lz4hc_insertandgetwidermatch() argument
203 int delta = (int)(ip - startlimit); in lz4hc_insertandgetwidermatch()
206 lz4hc_insert(hc4, ip); in lz4hc_insertandgetwidermatch()
207 ref = hashtable[HASH_VALUE(ip)] + base; in lz4hc_insertandgetwidermatch()
209 while ((ref >= ip - MAX_DISTANCE) && (ref >= hc4->base) in lz4hc_insertandgetwidermatch()
213 if (A32(ref) == A32(ip)) { in lz4hc_insertandgetwidermatch()
215 const u8 *ipt = ip + MINMATCH; in lz4hc_insertandgetwidermatch()
216 const u8 *startt = ip; in lz4hc_insertandgetwidermatch()
269 static inline int lz4_encodesequence(const u8 **ip, u8 **op, const u8 **anchor, in lz4_encodesequence() argument
276 length = (int)(*ip - *anchor); in lz4_encodesequence()
291 LZ4_WRITE_LITTLEENDIAN_16(*op, (u16)(*ip - ref)); in lz4_encodesequence()
311 *ip += ml; in lz4_encodesequence()
312 *anchor = *ip; in lz4_encodesequence()
322 const u8 *ip = (const u8 *)source; in lz4_compresshcctx() local
323 const u8 *anchor = ip; in lz4_compresshcctx()
324 const u8 *const iend = ip + isize; in lz4_compresshcctx()
340 ip++; in lz4_compresshcctx()
343 while (ip < mflimit) { in lz4_compresshcctx()
344 ml = lz4hc_insertandfindbestmatch(ctx, ip, matchlimit, (&ref)); in lz4_compresshcctx()
346 ip++; in lz4_compresshcctx()
351 start0 = ip; in lz4_compresshcctx()
355 if (ip+ml < mflimit) in lz4_compresshcctx()
356 ml2 = lz4hc_insertandgetwidermatch(ctx, ip + ml - 2, in lz4_compresshcctx()
357 ip + 1, matchlimit, ml, &ref2, &start2); in lz4_compresshcctx()
362 lz4_encodesequence(&ip, &op, &anchor, ml, ref); in lz4_compresshcctx()
366 if (start0 < ip) { in lz4_compresshcctx()
368 if (start2 < ip + ml0) { in lz4_compresshcctx()
369 ip = start0; in lz4_compresshcctx()
378 if ((start2 - ip) < 3) { in lz4_compresshcctx()
380 ip = start2; in lz4_compresshcctx()
391 if ((start2 - ip) < OPTIMAL_ML) { in lz4_compresshcctx()
396 if (ip + new_ml > start2 + ml2 - MINMATCH) in lz4_compresshcctx()
397 new_ml = (int)(start2 - ip) + ml2 - MINMATCH; in lz4_compresshcctx()
398 correction = new_ml - (int)(start2 - ip); in lz4_compresshcctx()
419 if (start2 < ip+ml) in lz4_compresshcctx()
420 ml = (int)(start2 - ip); in lz4_compresshcctx()
423 lz4_encodesequence(&ip, &op, &anchor, ml, ref); in lz4_compresshcctx()
424 ip = start2; in lz4_compresshcctx()
425 lz4_encodesequence(&ip, &op, &anchor, ml2, ref2); in lz4_compresshcctx()
430 if (start3 < ip + ml + 3) { in lz4_compresshcctx()
435 if (start3 >= (ip + ml)) { in lz4_compresshcctx()
436 if (start2 < ip + ml) { in lz4_compresshcctx()
438 (int)(ip + ml - start2); in lz4_compresshcctx()
449 lz4_encodesequence(&ip, &op, &anchor, ml, ref); in lz4_compresshcctx()
450 ip = start3; in lz4_compresshcctx()
470 if (start2 < ip + ml) { in lz4_compresshcctx()
471 if ((start2 - ip) < (int)ML_MASK) { in lz4_compresshcctx()
475 if (ip + ml > start2 + ml2 - MINMATCH) in lz4_compresshcctx()
476 ml = (int)(start2 - ip) + ml2 in lz4_compresshcctx()
478 correction = ml - (int)(start2 - ip); in lz4_compresshcctx()
485 ml = (int)(start2 - ip); in lz4_compresshcctx()
487 lz4_encodesequence(&ip, &op, &anchor, ml, ref); in lz4_compresshcctx()
489 ip = start2; in lz4_compresshcctx()