Lines Matching defs:dist
240 int dist; /* distance index */
270 /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
271 dist = 0;
273 base_dist[code] = dist;
275 _dist_code[dist++] = (uch)code;
278 Assert (dist == 256, "tr_static_init: dist != 256");
279 dist >>= 7; /* from now on, all distances are divided by 128 */
281 base_dist[code] = dist << 7;
283 _dist_code[256 + dist++] = (uch)code;
286 Assert (dist == 256, "tr_static_init: 256+dist != 512");
1015 int ZLIB_INTERNAL _tr_tally (s, dist, lc)
1017 unsigned dist; /* distance of matched string */
1018 unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
1020 s->sym_buf[s->sym_next++] = dist;
1021 s->sym_buf[s->sym_next++] = dist >> 8;
1023 if (dist == 0) {
1029 dist--; /* dist = match distance - 1 */
1030 Assert((ush)dist < (ush)MAX_DIST(s) &&
1032 (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match");
1035 s->dyn_dtree[d_code(dist)].Freq++;
1048 unsigned dist; /* distance of matched string */
1049 int lc; /* match length or unmatched char (if dist == 0) */
1055 dist = s->sym_buf[sx++] & 0xff;
1056 dist += (unsigned)(s->sym_buf[sx++] & 0xff) << 8;
1058 if (dist == 0) {
1070 dist--; /* dist is now the match distance - 1 */
1071 code = d_code(dist);
1077 dist -= (unsigned)base_dist[code];
1078 send_bits(s, dist, extra); /* send the extra distance bits */