Lines Matching refs:dist

301     int dist;     /* distance index */  in tr_static_init()  local
332 dist = 0; in tr_static_init()
334 base_dist[code] = dist; in tr_static_init()
336 _dist_code[dist++] = (uch)code; in tr_static_init()
339 Assert (dist == 256, "tr_static_init: dist != 256"); in tr_static_init()
340 dist >>= 7; /* from now on, all distances are divided by 128 */ in tr_static_init()
342 base_dist[code] = dist << 7; in tr_static_init()
344 _dist_code[256 + dist++] = (uch)code; in tr_static_init()
347 Assert (dist == 256, "tr_static_init: 256 + dist != 512"); in tr_static_init()
900 unsigned dist; /* distance of matched string */ in compress_block() local
908 dist = s->d_buf[sx]; in compress_block()
911 dist = s->sym_buf[sx++] & 0xff; in compress_block()
912 dist += (unsigned)(s->sym_buf[sx++] & 0xff) << 8; in compress_block()
915 if (dist == 0) { in compress_block()
927 dist--; /* dist is now the match distance - 1 */ in compress_block()
928 code = d_code(dist); in compress_block()
934 dist -= (unsigned)base_dist[code]; in compress_block()
935 send_bits(s, dist, extra); /* send the extra distance bits */ in compress_block()
1093 int ZLIB_INTERNAL _tr_tally(deflate_state *s, unsigned dist, unsigned lc) { argument
1095 s->d_buf[s->sym_next] = (ush)dist;
1098 s->sym_buf[s->sym_next++] = (uch)dist;
1099 s->sym_buf[s->sym_next++] = (uch)(dist >> 8);
1102 if (dist == 0) {
1108 dist--; /* dist = match distance - 1 */
1109 Assert((ush)dist < (ush)MAX_DIST(s) &&
1111 (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match");
1114 s->dyn_dtree[d_code(dist)].Freq++;