Lines Matching defs:dist
247 int dist; /* distance index */
277 /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
278 dist = 0;
280 base_dist[code] = dist;
282 _dist_code[dist++] = (uch)code;
285 Assert (dist == 256, "tr_static_init: dist != 256");
286 dist >>= 7; /* from now on, all distances are divided by 128 */
288 base_dist[code] = dist << 7;
290 _dist_code[256 + dist++] = (uch)code;
293 Assert (dist == 256, "tr_static_init: 256+dist != 512");
1026 int ZLIB_INTERNAL _tr_tally (s, dist, lc)
1028 unsigned dist; /* distance of matched string */
1029 unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
1031 s->sym_buf[s->sym_next++] = dist;
1032 s->sym_buf[s->sym_next++] = dist >> 8;
1034 if (dist == 0) {
1040 dist--; /* dist = match distance - 1 */
1041 Assert((ush)dist < (ush)MAX_DIST(s) &&
1043 (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match");
1046 s->dyn_dtree[d_code(dist)].Freq++;
1059 unsigned dist; /* distance of matched string */
1060 int lc; /* match length or unmatched char (if dist == 0) */
1066 dist = s->sym_buf[sx++] & 0xff;
1067 dist += (unsigned)(s->sym_buf[sx++] & 0xff) << 8;
1069 if (dist == 0) {
1081 dist--; /* dist is now the match distance - 1 */
1082 code = d_code(dist);
1088 dist -= base_dist[code];
1089 send_bits(s, dist, extra); /* send the extra distance bits */