34 #define LENGTH_CODES 29
40 #define L_CODES (LITERALS+1+LENGTH_CODES)
49 #define HEAP_SIZE (2*L_CODES+1)
60 # define GZIP_STATE 57
62 #define EXTRA_STATE 69
64 #define COMMENT_STATE 91
65 #define HCRC_STATE 103
66 #define BUSY_STATE 113
67 #define FINISH_STATE 666
186 # define max_insert_length max_lazy_match
287 #define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
290 #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
295 #define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD)
300 #define WIN_INIT MAX_MATCH
308 ulg stored_len,
int last);
312 ulg stored_len,
int last);
314 #define d_code(dist) \
315 ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
324 #if defined(GEN_TREES_H) || !defined(STDC)
333 # define _tr_tally_lit(s, c, flush) \
335 s->d_buf[s->sym_next] = 0; \
336 s->l_buf[s->sym_next++] = cc; \
337 s->dyn_ltree[cc].Freq++; \
338 flush = (s->sym_next == s->sym_end); \
340 # define _tr_tally_dist(s, distance, length, flush) \
341 { uch len = (uch)(length); \
342 ush dist = (ush)(distance); \
343 s->d_buf[s->sym_next] = dist; \
344 s->l_buf[s->sym_next++] = len; \
346 s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
347 s->dyn_dtree[d_code(dist)].Freq++; \
348 flush = (s->sym_next == s->sym_end); \
351 # define _tr_tally_lit(s, c, flush) \
353 s->sym_buf[s->sym_next++] = 0; \
354 s->sym_buf[s->sym_next++] = 0; \
355 s->sym_buf[s->sym_next++] = cc; \
356 s->dyn_ltree[cc].Freq++; \
357 flush = (s->sym_next == s->sym_end); \
359 # define _tr_tally_dist(s, distance, length, flush) \
360 { uch len = (uch)(length); \
361 ush dist = (ush)(distance); \
362 s->sym_buf[s->sym_next++] = (uch)dist; \
363 s->sym_buf[s->sym_next++] = (uch)(dist >> 8); \
364 s->sym_buf[s->sym_next++] = len; \
366 s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
367 s->dyn_dtree[d_code(dist)].Freq++; \
368 flush = (s->sym_next == s->sym_end); \
372 # define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
373 # define _tr_tally_dist(s, distance, length, flush) \
374 flush = _tr_tally(s, distance, length)
struct ct_data_s dyn_ltree[HEAP_SIZE]
void ZLIB_INTERNAL _tr_init(deflate_state *s)
gz_header FAR * gz_headerp
void ZLIB_INTERNAL _tr_align(deflate_state *s)
uch ZLIB_INTERNAL _dist_code[]
int ZLIB_INTERNAL _tr_tally(deflate_state *s, unsigned dist, unsigned lc)
struct tree_desc_s bl_desc
struct tree_desc_s d_desc
void ZLIB_INTERNAL _tr_flush_bits(deflate_state *s)
const static_tree_desc * stat_desc
void ZLIB_INTERNAL _tr_flush_block(deflate_state *s, charf *buf, ulg stored_len, int last)
struct ct_data_s dyn_dtree[2 *D_CODES+1]
struct tree_desc_s l_desc
struct internal_state deflate_state
uch ZLIB_INTERNAL _length_code[]
void ZLIB_INTERNAL _tr_stored_block(deflate_state *s, charf *buf, ulg stored_len, int last)
struct ct_data_s bl_tree[2 *BL_CODES+1]
struct tree_desc_s tree_desc