Lines Matching refs:dist
270 int dist; /* distance index */
298 /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
299 dist = 0;
301 base_dist[code] = dist;
303 _dist_code[dist++] = (uch)code;
306 Assert (dist == 256, "tr_static_init: dist != 256");
307 dist >>= 7; /* from now on, all distances are divided by 128 */
309 base_dist[code] = dist << 7;
311 _dist_code[256 + dist++] = (uch)code;
314 Assert (dist == 256, "tr_static_init: 256+dist != 512");
1046 int _tr_tally (s, dist, lc)
1048 unsigned dist; /* distance of matched string */
1049 unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
1051 s->d_buf[s->last_lit] = (ush)dist;
1053 if (dist == 0) {
1059 dist--; /* dist = match distance - 1 */
1060 Assert((ush)dist < (ush)MAX_DIST(s) &&
1062 (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match");
1065 s->dyn_dtree[d_code(dist)].Freq++;
1101 unsigned dist; /* distance of matched string */
1102 int lc; /* match length or unmatched char (if dist == 0) */
1108 dist = s->d_buf[lx];
1110 if (dist == 0) {
1122 dist--; /* dist is now the match distance - 1 */
1123 code = d_code(dist);
1129 dist -= base_dist[code];
1130 send_bits(s, dist, extra); /* send the extra distance bits */