deflate.h (180208) | deflate.h (205471) |
---|---|
1/* deflate.h -- internal compression state | 1/* deflate.h -- internal compression state |
2 * Copyright (C) 1995-2004 Jean-loup Gailly | 2 * Copyright (C) 1995-2009 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 --- 244 unchanged lines hidden (view full) --- 255 /* Output buffer. bits are inserted starting at the bottom (least 256 * significant bits). 257 */ 258 int bi_valid; 259 /* Number of valid bits in bi_buf. All bits above the last valid bit 260 * are always zero. 261 */ 262 | 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 --- 244 unchanged lines hidden (view full) --- 255 /* Output buffer. bits are inserted starting at the bottom (least 256 * significant bits). 257 */ 258 int bi_valid; 259 /* Number of valid bits in bi_buf. All bits above the last valid bit 260 * are always zero. 261 */ 262 |
263 ulg high_water; 264 /* High water mark offset in window for initialized bytes -- bytes above 265 * this are set to zero in order to avoid memory check warnings when 266 * longest match routines access bytes past the input. This is then 267 * updated to the new high water mark. 268 */ 269 |
|
263} FAR deflate_state; 264 265/* Output a byte on the stream. 266 * IN assertion: there is enough room in pending_buf. 267 */ 268#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);} 269 270 271#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) 272/* Minimum amount of lookahead, except at the end of the input file. 273 * See deflate.c for comments about the MIN_MATCH+1. 274 */ 275 276#define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD) 277/* In order to simplify the code, particularly on 16 bit machines, match 278 * distances are limited to MAX_DIST instead of WSIZE. 279 */ 280 | 270} FAR deflate_state; 271 272/* Output a byte on the stream. 273 * IN assertion: there is enough room in pending_buf. 274 */ 275#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);} 276 277 278#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) 279/* Minimum amount of lookahead, except at the end of the input file. 280 * See deflate.c for comments about the MIN_MATCH+1. 281 */ 282 283#define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD) 284/* In order to simplify the code, particularly on 16 bit machines, match 285 * distances are limited to MAX_DIST instead of WSIZE. 286 */ 287 |
288#define WIN_INIT MAX_MATCH 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 |
|
281 /* in trees.c */ 282void _tr_init OF((deflate_state *s)); 283int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc)); 284void _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len, | 292 /* in trees.c */ 293void _tr_init OF((deflate_state *s)); 294int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc)); 295void _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len, |
285 int eof)); | 296 int last)); |
286void _tr_align OF((deflate_state *s)); 287void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len, | 297void _tr_align OF((deflate_state *s)); 298void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len, |
288 int eof)); | 299 int last)); |
289 290#define d_code(dist) \ 291 ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)]) 292/* Mapping from a distance to a distance code. dist is the distance - 1 and 293 * must not have side effects. _dist_code[256] and _dist_code[257] are never 294 * used. 295 */ 296 --- 35 unchanged lines hidden --- | 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 305 * used. 306 */ 307 --- 35 unchanged lines hidden --- |