Lines Matching defs:dist
301 int dist; /* distance index */
331 /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
332 dist = 0;
334 base_dist[code] = dist;
336 _dist_code[dist++] = (uch)code;
339 Assert (dist == 256, "tr_static_init: dist != 256");
340 dist >>= 7; /* from now on, all distances are divided by 128 */
342 base_dist[code] = dist << 7;
344 _dist_code[256 + dist++] = (uch)code;
347 Assert (dist == 256, "tr_static_init: 256 + dist != 512");
900 unsigned dist; /* distance of matched string */
901 int lc; /* match length or unmatched char (if dist == 0) */
908 dist = s->d_buf[sx];
911 dist = s->sym_buf[sx++] & 0xff;
912 dist += (unsigned)(s->sym_buf[sx++] & 0xff) << 8;
915 if (dist == 0) {
927 dist--; /* dist is now the match distance - 1 */
928 code = d_code(dist);
934 dist -= (unsigned)base_dist[code];
935 send_bits(s, dist, extra); /* send the extra distance bits */
1093 int ZLIB_INTERNAL _tr_tally(deflate_state *s, unsigned dist, unsigned lc) {
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++;