Lines Matching refs:dist
273 int dist; /* distance index */
301 /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
302 dist = 0;
304 base_dist[code] = dist;
306 _dist_code[dist++] = (uch)code;
309 Assert (dist == 256, "tr_static_init: dist != 256");
310 dist >>= 7; /* from now on, all distances are divided by 128 */
312 base_dist[code] = dist << 7;
314 _dist_code[256 + dist++] = (uch)code;
317 Assert (dist == 256, "tr_static_init: 256+dist != 512");
1049 int _tr_tally (s, dist, lc)
1051 unsigned dist; /* distance of matched string */
1052 unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
1054 s->d_buf[s->last_lit] = (ush)dist;
1056 if (dist == 0) {
1062 dist--; /* dist = match distance - 1 */
1063 Assert((ush)dist < (ush)MAX_DIST(s) &&
1065 (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match");
1068 s->dyn_dtree[d_code(dist)].Freq++;
1104 unsigned dist; /* distance of matched string */
1105 int lc; /* match length or unmatched char (if dist == 0) */
1111 dist = s->d_buf[lx];
1113 if (dist == 0) {
1125 dist--; /* dist is now the match distance - 1 */
1126 code = d_code(dist);
1132 dist -= base_dist[code];
1133 send_bits(s, dist, extra); /* send the extra distance bits */