Lines Matching defs:dist
246 int dist; /* distance index */
274 /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
275 dist = 0;
277 base_dist[code] = dist;
279 _dist_code[dist++] = (uch)code;
282 Assert (dist == 256, "tr_static_init: dist != 256");
283 dist >>= 7; /* from now on, all distances are divided by 128 */
285 base_dist[code] = dist << 7;
287 _dist_code[256 + dist++] = (uch)code;
290 Assert (dist == 256, "tr_static_init: 256+dist != 512");
1022 int _tr_tally (s, dist, lc)
1024 unsigned dist; /* distance of matched string */
1025 unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
1027 s->d_buf[s->last_lit] = (ush)dist;
1029 if (dist == 0) {
1035 dist--; /* dist = match distance - 1 */
1036 Assert((ush)dist < (ush)MAX_DIST(s) &&
1038 (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match");
1041 s->dyn_dtree[d_code(dist)].Freq++;
1077 unsigned dist; /* distance of matched string */
1078 int lc; /* match length or unmatched char (if dist == 0) */
1084 dist = s->d_buf[lx];
1086 if (dist == 0) {
1098 dist--; /* dist is now the match distance - 1 */
1099 code = d_code(dist);
1105 dist -= base_dist[code];
1106 send_bits(s, dist, extra); /* send the extra distance bits */