Lines Matching refs:dist
246 int dist; /* distance index */ in tr_static_init() local
275 dist = 0; in tr_static_init()
277 base_dist[code] = dist; in tr_static_init()
279 _dist_code[dist++] = (uch)code; in tr_static_init()
282 Assert (dist == 256, "tr_static_init: dist != 256"); in tr_static_init()
283 dist >>= 7; /* from now on, all distances are divided by 128 */ in tr_static_init()
285 base_dist[code] = dist << 7; in tr_static_init()
287 _dist_code[256 + dist++] = (uch)code; in tr_static_init()
290 Assert (dist == 256, "tr_static_init: 256+dist != 512"); in tr_static_init()
1022 int _tr_tally (s, dist, lc) in _tr_tally() argument
1024 unsigned dist; /* distance of matched string */
1027 s->d_buf[s->last_lit] = (ush)dist;
1029 if (dist == 0) {
1035 dist--; /* dist = match distance - 1 */
1036 Assert((ush)dist < (ush)MAX_DIST(s) &&
1038 (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match");
1041 s->dyn_dtree[d_code(dist)].Freq++;
1077 unsigned dist; /* distance of matched string */ local
1084 dist = s->d_buf[lx];
1086 if (dist == 0) {
1098 dist--; /* dist is now the match distance - 1 */
1099 code = d_code(dist);
1105 dist -= base_dist[code];
1106 send_bits(s, dist, extra); /* send the extra distance bits */