22 #define LENGTH_CODES 29
28 #define L_CODES (LITERALS+1+LENGTH_CODES)
37 #define HEAP_SIZE (2*L_CODES+1)
44 #define BUSY_STATE 113
45 #define FINISH_STATE 666
76 typedef unsigned IPos;
152 uInt max_chain_length;
163 # define max_insert_length max_lazy_match
187 ush bl_count[MAX_BITS+1];
190 int heap[2*L_CODES+1];
197 uch depth[2*L_CODES+1];
255 #define put_byte(s, c) {s->pending_buf[s->pending++] = (c);}
258 #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
263 #define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD)
270 int _zlib_tr_tally OF((
deflate_state *s,
unsigned dist,
unsigned lc));
271 void _zlib_tr_flush_block OF((
deflate_state *s, charf *buf, ulg stored_len,
274 void _zlib_tr_stored_block OF((
deflate_state *s, charf *buf, ulg stored_len,
277 #define d_code(dist) \
278 ((dist) < 256 ? _zlib_dist_code[dist] : _zlib_dist_code[256+((dist)>>7)])
287 #if defined(GEN_TREES_H) || !defined(STDC)
288 extern uch _zlib_length_code[];
289 extern uch _zlib_dist_code[];
291 extern const uch _zlib_length_code[];
292 extern const uch _zlib_dist_code[];
295 # define _tr_tally_lit(s, c, flush) \
297 s->d_buf[s->last_lit] = 0; \
298 s->l_buf[s->last_lit++] = cc; \
299 s->dyn_ltree[cc].Freq++; \
300 flush = (s->last_lit == s->lit_bufsize-1); \
302 # define _tr_tally_dist(s, distance, length, flush) \
303 { uch len = (length); \
304 ush dist = (distance); \
305 s->d_buf[s->last_lit] = dist; \
306 s->l_buf[s->last_lit++] = len; \
308 s->dyn_ltree[_zlib_length_code[len]+LITERALS+1].Freq++; \
309 s->dyn_dtree[d_code(dist)].Freq++; \
310 flush = (s->last_lit == s->lit_bufsize-1); \
313 # define _tr_tally_lit(s, c, flush) flush = _zlib_tr_tally(s, 0, c)
314 # define _tr_tally_dist(s, distance, length, flush) \
315 flush = _zlib_tr_tally(s, distance, length)
Definition: zlib_deflate.c:148