Lines Matching refs:dist
409 local int ct_tally OF((deflate_state *s, int dist, int lc));
1599 #define d_code(dist) \
1600 ((dist) < 256 ? dist_code[dist] : dist_code[256+((dist)>>7)])
1601 /* Mapping from a distance to a distance code. dist is the distance - 1 and
1676 int dist; /* distance index */
1695 /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
1696 dist = 0;
1698 base_dist[code] = dist;
1700 dist_code[dist++] = (uch)code;
1703 Assert (dist == 256, "ct_static_init: dist != 256");
1704 dist >>= 7; /* from now on, all distances are divided by 128 */
1706 base_dist[code] = dist << 7;
1708 dist_code[256 + dist++] = (uch)code;
1711 Assert (dist == 256, "ct_static_init: 256+dist != 512");
2403 local int ct_tally (s, dist, lc)
2405 int dist; /* distance of matched string */
2406 int lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
2408 s->d_buf[s->last_lit] = (ush)dist;
2410 if (dist == 0) {
2416 dist--; /* dist = match distance - 1 */
2417 Assert((ush)dist < (ush)MAX_DIST(s) &&
2419 (ush)d_code(dist) < (ush)D_CODES, "ct_tally: bad match");
2422 s->dyn_dtree[d_code(dist)].Freq++;
2456 unsigned dist; /* distance of matched string */
2457 int lc; /* match length or unmatched char (if dist == 0) */
2463 dist = s->d_buf[lx];
2465 if (dist == 0) {
2477 dist--; /* dist is now the match distance - 1 */
2478 code = d_code(dist);
2484 dist -= base_dist[code];
2485 send_bits(s, dist, extra); /* send the extra distance bits */
4109 uInt dist; /* distance back to copy from */
4239 c->sub.copy.dist = t->base;
4256 c->sub.copy.dist += (uInt)b & inflate_mask[j];
4258 Tracevv((stderr, "inflate: distance %u\n", c->sub.copy.dist));
4262 f = (uInt)(q - s->window) < c->sub.copy.dist ?
4263 s->end - (c->sub.copy.dist - (q - s->window)) :
4264 q - c->sub.copy.dist;
4266 f = q - c->sub.copy.dist;
4267 if ((uInt)(q - s->window) < c->sub.copy.dist)
4268 f = s->end - (c->sub.copy.dist - (q - s->window));