Lines Matching refs:dist
1084 #define D_CODE(dist) \ argument
1085 ((dist) < 256 ? G2.dist_code[dist] : G2.dist_code[256 + ((dist)>>7)])
1573 static int ct_tally(int dist, int lc) in ct_tally() argument
1576 if (dist == 0) { in ct_tally()
1581 dist--; /* dist = match distance - 1 */ in ct_tally()
1582 Assert((ush) dist < (ush) MAX_DIST in ct_tally()
1584 && (ush) D_CODE(dist) < (ush) D_CODES, "ct_tally: bad match" in ct_tally()
1588 G2.dyn_dtree[D_CODE(dist)].Freq++; in ct_tally()
1590 G1.d_buf[G2.last_dist++] = dist; in ct_tally()
1632 unsigned dist; /* distance of matched string */ in compress_block() local
1657 dist = G1.d_buf[dx++]; in compress_block()
1659 code = D_CODE(dist); in compress_block()
1665 dist -= G2.base_dist[code]; in compress_block()
1666 send_bits(dist, extra); /* send the extra distance bits */ in compress_block()
1974 int dist; /* distance index */ in ct_init() local
1999 dist = 0; in ct_init()
2001 G2.base_dist[code] = dist; in ct_init()
2003 G2.dist_code[dist++] = code; in ct_init()
2006 Assert(dist == 256, "ct_init: dist != 256"); in ct_init()
2007 dist >>= 7; /* from now on, all distances are divided by 128 */ in ct_init()
2009 G2.base_dist[code] = dist << 7; in ct_init()
2011 G2.dist_code[256 + dist++] = code; in ct_init()
2014 Assert(dist == 256, "ct_init: 256+dist != 512"); in ct_init()