30 #define LENGTH_CODES 29
36 #define L_CODES (LITERALS+1+LENGTH_CODES)
45 #define HEAP_SIZE (2*L_CODES+1)
52 #define EXTRA_STATE 69
54 #define COMMENT_STATE 91
55 #define HCRC_STATE 103
56 #define BUSY_STATE 113
57 #define FINISH_STATE 666
78 typedef struct static_tree_desc_s static_tree_desc;
88 typedef unsigned IPos;
176 # define max_insert_length max_lazy_match
268 #define put_byte(s, c) {s->pending_buf[s->pending++] = (c);}
271 #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
276 #define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD)
283 int _tr_tally OF((
deflate_state *s,
unsigned dist,
unsigned lc));
284 void _tr_flush_block OF((
deflate_state *s, charf *buf, ulg stored_len,
287 void _tr_stored_block OF((
deflate_state *s, charf *buf, ulg stored_len,
290 #define d_code(dist) \
291 ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
300 #if defined(GEN_TREES_H) || !defined(STDC)
301 extern uch _length_code[];
302 extern uch _dist_code[];
304 extern const uch _length_code[];
305 extern const uch _dist_code[];
308 # define _tr_tally_lit(s, c, flush) \
310 s->d_buf[s->last_lit] = 0; \
311 s->l_buf[s->last_lit++] = cc; \
312 s->dyn_ltree[cc].Freq++; \
313 flush = (s->last_lit == s->lit_bufsize-1); \
315 # define _tr_tally_dist(s, distance, length, flush) \
316 { uch len = (length); \
317 ush dist = (distance); \
318 s->d_buf[s->last_lit] = dist; \
319 s->l_buf[s->last_lit++] = len; \
321 s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
322 s->dyn_dtree[d_code(dist)].Freq++; \
323 flush = (s->last_lit == s->lit_bufsize-1); \
326 # define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
327 # define _tr_tally_dist(s, distance, length, flush) \
328 flush = _tr_tally(s, distance, length)
struct tree_desc_s l_desc
struct ct_data_s dyn_dtree[2 *D_CODES+1]
struct ct_data_s bl_tree[2 *BL_CODES+1]
struct tree_desc_s bl_desc
struct tree_desc_s d_desc
struct ct_data_s dyn_ltree[HEAP_SIZE]
static_tree_desc * stat_desc