Rev 1896 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1896 | Rev 3926 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /* deflate.h -- internal compression state |
1 | /* deflate.h -- internal compression state |
2 | * Copyright (C) 1995-2010 Jean-loup Gailly |
2 | * Copyright (C) 1995-2012 Jean-loup Gailly |
3 | * For conditions of distribution and use, see copyright notice in zlib.h |
3 | * For conditions of distribution and use, see copyright notice in zlib.h |
4 | */ |
4 | */ |
Line 5... | Line 5... | ||
5 | 5 | ||
6 | /* WARNING: this file should *not* be used by applications. It is |
6 | /* WARNING: this file should *not* be used by applications. It is |
Line 46... | Line 46... | ||
46 | /* maximum heap size */ |
46 | /* maximum heap size */ |
Line 47... | Line 47... | ||
47 | 47 | ||
48 | #define MAX_BITS 15 |
48 | #define MAX_BITS 15 |
Line -... | Line 49... | ||
- | 49 | /* All codes must not exceed MAX_BITS bits */ |
|
- | 50 | ||
- | 51 | #define Buf_size 16 |
|
49 | /* All codes must not exceed MAX_BITS bits */ |
52 | /* size of bit buffer in bi_buf */ |
50 | 53 | ||
51 | #define INIT_STATE 42 |
54 | #define INIT_STATE 42 |
52 | #define EXTRA_STATE 69 |
55 | #define EXTRA_STATE 69 |
53 | #define NAME_STATE 73 |
56 | #define NAME_STATE 73 |
Line 99... | Line 102... | ||
99 | Bytef *pending_out; /* next pending byte to output to the stream */ |
102 | Bytef *pending_out; /* next pending byte to output to the stream */ |
100 | uInt pending; /* nb of bytes in the pending buffer */ |
103 | uInt pending; /* nb of bytes in the pending buffer */ |
101 | int wrap; /* bit 0 true for zlib, bit 1 true for gzip */ |
104 | int wrap; /* bit 0 true for zlib, bit 1 true for gzip */ |
102 | gz_headerp gzhead; /* gzip header information to write */ |
105 | gz_headerp gzhead; /* gzip header information to write */ |
103 | uInt gzindex; /* where in extra, name, or comment */ |
106 | uInt gzindex; /* where in extra, name, or comment */ |
104 | Byte method; /* STORED (for zip only) or DEFLATED */ |
107 | Byte method; /* can only be DEFLATED */ |
105 | int last_flush; /* value of flush param for previous deflate call */ |
108 | int last_flush; /* value of flush param for previous deflate call */ |
Line 106... | Line 109... | ||
106 | 109 | ||
Line 107... | Line 110... | ||
107 | /* used by deflate.c: */ |
110 | /* used by deflate.c: */ |
Line 186... | Line 189... | ||
186 | /* Use a faster search when the previous match is longer than this */ |
189 | /* Use a faster search when the previous match is longer than this */ |
Line 187... | Line 190... | ||
187 | 190 | ||
Line 188... | Line 191... | ||
188 | int nice_match; /* Stop searching when current match exceeds this */ |
191 | int nice_match; /* Stop searching when current match exceeds this */ |
189 | 192 | ||
190 | /* used by trees.c: */ |
193 | /* used by trees.c: */ |
191 | /* Didn't use ct_data typedef below to supress compiler warning */ |
194 | /* Didn't use ct_data typedef below to suppress compiler warning */ |
192 | struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ |
195 | struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ |
Line 193... | Line 196... | ||
193 | struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ |
196 | struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ |
Line 242... | Line 245... | ||
242 | */ |
245 | */ |
Line 243... | Line 246... | ||
243 | 246 | ||
244 | ulg opt_len; /* bit length of current block with optimal trees */ |
247 | ulg opt_len; /* bit length of current block with optimal trees */ |
245 | ulg static_len; /* bit length of current block with static trees */ |
248 | ulg static_len; /* bit length of current block with static trees */ |
246 | uInt matches; /* number of string matches in current block */ |
249 | uInt matches; /* number of string matches in current block */ |
Line 247... | Line 250... | ||
247 | int last_eob_len; /* bit length of EOB code for last block */ |
250 | uInt insert; /* bytes at end of window left to insert */ |
248 | 251 | ||
249 | #ifdef DEBUG |
252 | #ifdef DEBUG |
250 | ulg compressed_len; /* total bit length of compressed file mod 2^32 */ |
253 | ulg compressed_len; /* total bit length of compressed file mod 2^32 */ |
Line 292... | Line 295... | ||
292 | /* in trees.c */ |
295 | /* in trees.c */ |
293 | void ZLIB_INTERNAL _tr_init OF((deflate_state *s)); |
296 | void ZLIB_INTERNAL _tr_init OF((deflate_state *s)); |
294 | int ZLIB_INTERNAL _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc)); |
297 | int ZLIB_INTERNAL _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc)); |
295 | void ZLIB_INTERNAL _tr_flush_block OF((deflate_state *s, charf *buf, |
298 | void ZLIB_INTERNAL _tr_flush_block OF((deflate_state *s, charf *buf, |
296 | ulg stored_len, int last)); |
299 | ulg stored_len, int last)); |
- | 300 | void ZLIB_INTERNAL _tr_flush_bits OF((deflate_state *s)); |
|
297 | void ZLIB_INTERNAL _tr_align OF((deflate_state *s)); |
301 | void ZLIB_INTERNAL _tr_align OF((deflate_state *s)); |
298 | void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf, |
302 | void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf, |
299 | ulg stored_len, int last)); |
303 | ulg stored_len, int last)); |
Line 300... | Line 304... | ||
300 | 304 |