Lines Matching defs:dist

585 int  _tr_tally		OF((deflate_state *s, unsigned dist, unsigned lc));
593 #define d_code(dist) \
594 ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
596 * Mapping from a distance to a distance code. dist is the distance - 1 and
616 ush dist = (distance); \
617 s->d_buf[s->last_lit] = dist; \
619 dist--; \
621 s->dyn_dtree[d_code(dist)].Freq++; \
2465 int dist; /* distance index */
2496 /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
2497 dist = 0;
2499 base_dist[code] = dist;
2501 _dist_code[dist++] = (uch)code;
2504 Assert(dist == 256, "tr_static_init: dist != 256");
2505 dist >>= 7; /* from now on, all distances are divided by 128 */
2507 base_dist[code] = dist << 7;
2509 _dist_code[256 + dist++] = (uch)code;
2512 Assert(dist == 256, "tr_static_init: 256+dist != 512");
3304 _tr_tally(s, dist, lc)
3306 unsigned dist; /* distance of matched string */
3307 /* match length-MIN_MATCH or unmatched char (if dist==0) */
3310 s->d_buf[s->last_lit] = (ush)dist;
3312 if (dist == 0) {
3318 dist--; /* dist = match distance - 1 */
3319 Assert((ush)dist < (ush)MAX_DIST(s) &&
3321 (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match");
3324 s->dyn_dtree[d_code(dist)].Freq++;
3364 unsigned dist; /* distance of matched string */
3365 int lc; /* match length or unmatched char (if dist == 0) */
3371 dist = s->d_buf[lx];
3373 if (dist == 0) {
3388 /* dist is now the match distance - 1 */
3389 dist--;
3390 code = d_code(dist);
3397 dist -= base_dist[code];
3399 send_bits(s, dist, extra);
5290 uInt dist; /* distance back to copy from */
5428 c->sub.copy.dist = t->base;
5444 c->sub.copy.dist += (uInt)b & inflate_mask[j];
5448 c->sub.copy.dist));
5454 f = (uInt)(q - s->window) < c->sub.copy.dist ?
5455 s->end - (c->sub.copy.dist - (q - s->window)) :
5456 q - c->sub.copy.dist;
5458 f = q - c->sub.copy.dist;
5459 if ((uInt)(q - s->window) < c->sub.copy.dist)
5460 f = s->end - (c->sub.copy.dist -