Deleted Added
full compact
deflate.h (206905) deflate.h (230837)
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
4 */
5
6/* WARNING: this file should *not* be used by applications. It is
7 part of the implementation of the compression library and is
8 subject to change. Applications should only use zlib.h.
9 */
10

--- 32 unchanged lines hidden (view full) ---

43/* number of codes used to transfer the bit lengths */
44
45#define HEAP_SIZE (2*L_CODES+1)
46/* maximum heap size */
47
48#define MAX_BITS 15
49/* All codes must not exceed MAX_BITS bits */
50
3 * For conditions of distribution and use, see copyright notice in zlib.h
4 */
5
6/* WARNING: this file should *not* be used by applications. It is
7 part of the implementation of the compression library and is
8 subject to change. Applications should only use zlib.h.
9 */
10

--- 32 unchanged lines hidden (view full) ---

43/* number of codes used to transfer the bit lengths */
44
45#define HEAP_SIZE (2*L_CODES+1)
46/* maximum heap size */
47
48#define MAX_BITS 15
49/* All codes must not exceed MAX_BITS bits */
50
51#define Buf_size 16
52/* size of bit buffer in bi_buf */
53
51#define INIT_STATE 42
52#define EXTRA_STATE 69
53#define NAME_STATE 73
54#define COMMENT_STATE 91
55#define HCRC_STATE 103
56#define BUSY_STATE 113
57#define FINISH_STATE 666
58/* Stream status */

--- 124 unchanged lines hidden (view full) ---

183 int strategy; /* favor or force Huffman coding*/
184
185 uInt good_match;
186 /* Use a faster search when the previous match is longer than this */
187
188 int nice_match; /* Stop searching when current match exceeds this */
189
190 /* used by trees.c: */
54#define INIT_STATE 42
55#define EXTRA_STATE 69
56#define NAME_STATE 73
57#define COMMENT_STATE 91
58#define HCRC_STATE 103
59#define BUSY_STATE 113
60#define FINISH_STATE 666
61/* Stream status */

--- 124 unchanged lines hidden (view full) ---

186 int strategy; /* favor or force Huffman coding*/
187
188 uInt good_match;
189 /* Use a faster search when the previous match is longer than this */
190
191 int nice_match; /* Stop searching when current match exceeds this */
192
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 */
193 struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
194 struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */
195
196 struct tree_desc_s l_desc; /* desc. for literal tree */
197 struct tree_desc_s d_desc; /* desc. for distance tree */
198 struct tree_desc_s bl_desc; /* desc. for bit length tree */
199

--- 39 unchanged lines hidden (view full) ---

239 /* Buffer for distances. To simplify the code, d_buf and l_buf have
240 * the same number of elements. To use different lengths, an extra flag
241 * array would be necessary.
242 */
243
244 ulg opt_len; /* bit length of current block with optimal trees */
245 ulg static_len; /* bit length of current block with static trees */
246 uInt matches; /* number of string matches in current block */
195 struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */
196 struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
197 struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */
198
199 struct tree_desc_s l_desc; /* desc. for literal tree */
200 struct tree_desc_s d_desc; /* desc. for distance tree */
201 struct tree_desc_s bl_desc; /* desc. for bit length tree */
202

--- 39 unchanged lines hidden (view full) ---

242 /* Buffer for distances. To simplify the code, d_buf and l_buf have
243 * the same number of elements. To use different lengths, an extra flag
244 * array would be necessary.
245 */
246
247 ulg opt_len; /* bit length of current block with optimal trees */
248 ulg static_len; /* bit length of current block with static trees */
249 uInt matches; /* number of string matches in current block */
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
249#ifdef DEBUG
250 ulg compressed_len; /* total bit length of compressed file mod 2^32 */
251 ulg bits_sent; /* bit length of compressed data sent mod 2^32 */
252#endif
253
254 ush bi_buf;
255 /* Output buffer. bits are inserted starting at the bottom (least

--- 33 unchanged lines hidden (view full) ---

289/* Number of bytes after end of data in window to initialize in order to avoid
290 memory checker errors from longest match routines */
291
292 /* in trees.c */
293void ZLIB_INTERNAL _tr_init OF((deflate_state *s));
294int ZLIB_INTERNAL _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
295void ZLIB_INTERNAL _tr_flush_block OF((deflate_state *s, charf *buf,
296 ulg stored_len, int last));
251
252#ifdef DEBUG
253 ulg compressed_len; /* total bit length of compressed file mod 2^32 */
254 ulg bits_sent; /* bit length of compressed data sent mod 2^32 */
255#endif
256
257 ush bi_buf;
258 /* Output buffer. bits are inserted starting at the bottom (least

--- 33 unchanged lines hidden (view full) ---

292/* Number of bytes after end of data in window to initialize in order to avoid
293 memory checker errors from longest match routines */
294
295 /* in trees.c */
296void ZLIB_INTERNAL _tr_init OF((deflate_state *s));
297int ZLIB_INTERNAL _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
298void ZLIB_INTERNAL _tr_flush_block OF((deflate_state *s, charf *buf,
299 ulg stored_len, int last));
300void ZLIB_INTERNAL _tr_flush_bits OF((deflate_state *s));
297void ZLIB_INTERNAL _tr_align OF((deflate_state *s));
298void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
299 ulg stored_len, int last));
300
301#define d_code(dist) \
302 ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
303/* Mapping from a distance to a distance code. dist is the distance - 1 and
304 * must not have side effects. _dist_code[256] and _dist_code[257] are never

--- 38 unchanged lines hidden ---
301void ZLIB_INTERNAL _tr_align OF((deflate_state *s));
302void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
303 ulg stored_len, int last));
304
305#define d_code(dist) \
306 ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
307/* Mapping from a distance to a distance code. dist is the distance - 1 and
308 * must not have side effects. _dist_code[256] and _dist_code[257] are never

--- 38 unchanged lines hidden ---