Lines Matching refs:dist
247 int dist; /* distance index */ in tr_static_init() local
278 dist = 0; in tr_static_init()
280 base_dist[code] = dist; in tr_static_init()
282 _dist_code[dist++] = (uch)code; in tr_static_init()
285 Assert (dist == 256, "tr_static_init: dist != 256"); in tr_static_init()
286 dist >>= 7; /* from now on, all distances are divided by 128 */ in tr_static_init()
288 base_dist[code] = dist << 7; in tr_static_init()
290 _dist_code[256 + dist++] = (uch)code; in tr_static_init()
293 Assert (dist == 256, "tr_static_init: 256+dist != 512"); in tr_static_init()
1026 int ZLIB_INTERNAL _tr_tally (s, dist, lc) in _tr_tally() argument
1028 unsigned dist; /* distance of matched string */
1031 s->d_buf[s->last_lit] = (ush)dist;
1033 if (dist == 0) {
1039 dist--; /* dist = match distance - 1 */
1040 Assert((ush)dist < (ush)MAX_DIST(s) &&
1042 (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match");
1045 s->dyn_dtree[d_code(dist)].Freq++;
1081 unsigned dist; /* distance of matched string */ local
1088 dist = s->d_buf[lx];
1090 if (dist == 0) {
1102 dist--; /* dist is now the match distance - 1 */
1103 code = d_code(dist);
1109 dist -= base_dist[code];
1110 send_bits(s, dist, extra); /* send the extra distance bits */