Lines Matching defs:dist

540 int  _tr_tally        OF((deflate_state *s, unsigned dist, unsigned lc));
2006 #define d_code(dist) \
2007 ((dist) < 256 ? dist_code[dist] : dist_code[256+((dist)>>7)])
2008 /* Mapping from a distance to a distance code. dist is the distance - 1 and
2083 int dist; /* distance index */
2104 /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
2105 dist = 0;
2107 base_dist[code] = dist;
2109 dist_code[dist++] = (uch)code;
2112 Assert (dist == 256, "tr_static_init: dist != 256");
2113 dist >>= 7; /* from now on, all distances are divided by 128 */
2115 base_dist[code] = dist << 7;
2117 dist_code[256 + dist++] = (uch)code;
2120 Assert (dist == 256, "tr_static_init: 256+dist != 512");
2804 int _tr_tally (s, dist, lc)
2806 unsigned dist; /* distance of matched string */
2807 unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
2809 s->d_buf[s->last_lit] = (ush)dist;
2811 if (dist == 0) {
2817 dist--; /* dist = match distance - 1 */
2818 Assert((ush)dist < (ush)MAX_DIST(s) &&
2820 (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match");
2823 s->dyn_dtree[d_code(dist)].Freq++;
2857 unsigned dist; /* distance of matched string */
2858 int lc; /* match length or unmatched char (if dist == 0) */
2864 dist = s->d_buf[lx];
2866 if (dist == 0) {
2878 dist--; /* dist is now the match distance - 1 */
2879 code = d_code(dist);
2885 dist -= base_dist[code];
2886 send_bits(s, dist, extra); /* send the extra distance bits */
4652 uInt dist; /* distance back to copy from */
4783 c->sub.copy.dist = t->base;
4800 c->sub.copy.dist += (uInt)b & inflate_mask[j];
4802 Tracevv((stderr, "inflate: distance %u\n", c->sub.copy.dist));
4806 f = (uInt)(q - s->window) < c->sub.copy.dist ?
4807 s->end - (c->sub.copy.dist - (q - s->window)) :
4808 q - c->sub.copy.dist;
4810 f = q - c->sub.copy.dist;
4811 if ((uInt)(q - s->window) < c->sub.copy.dist)
4812 f = s->end - (c->sub.copy.dist - (uInt)(q - s->window));