Lines Matching refs:dist
159 #define d_code(dist) \ argument
160 ((dist) < 256 ? dist_code[dist] : dist_code[256+((dist)>>7)])
178 int dist; /* distance index */ in tr_static_init() local
200 dist = 0; in tr_static_init()
202 base_dist[code] = dist; in tr_static_init()
204 dist_code[dist++] = (uch)code; in tr_static_init()
207 Assert (dist == 256, "tr_static_init: dist != 256"); in tr_static_init()
208 dist >>= 7; /* from now on, all distances are divided by 128 */ in tr_static_init()
210 base_dist[code] = dist << 7; in tr_static_init()
212 dist_code[256 + dist++] = (uch)code; in tr_static_init()
215 Assert (dist == 256, "tr_static_init: 256+dist != 512"); in tr_static_init()
917 unsigned dist, /* distance of matched string */ argument
921 s->d_buf[s->last_lit] = (ush)dist;
923 if (dist == 0) {
929 dist--; /* dist = match distance - 1 */
930 Assert((ush)dist < (ush)MAX_DIST(s) &&
932 (ush)d_code(dist) < (ush)D_CODES, "zlib_tr_tally: bad match");
935 s->dyn_dtree[d_code(dist)].Freq++;
970 unsigned dist; /* distance of matched string */ local
977 dist = s->d_buf[lx];
979 if (dist == 0) {
991 dist--; /* dist is now the match distance - 1 */
992 code = d_code(dist);
998 dist -= base_dist[code];
999 send_bits(s, dist, extra); /* send the extra distance bits */