diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2010-07-30 20:03:17 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2010-07-30 20:03:17 (GMT) |
commit | ce126edfd0df77da41b961f85d82d94c450c61f1 (patch) | |
tree | 10f6b5021ff273b85aa70f05e9cd1e450944dea5 /Modules/zlib/deflate.h | |
parent | d496c4c9360b481ca68b68b6bba6b6687136e442 (diff) | |
download | cpython-ce126edfd0df77da41b961f85d82d94c450c61f1.zip cpython-ce126edfd0df77da41b961f85d82d94c450c61f1.tar.gz cpython-ce126edfd0df77da41b961f85d82d94c450c61f1.tar.bz2 |
Import files from zlib 1.2.5.
Diffstat (limited to 'Modules/zlib/deflate.h')
-rw-r--r-- | Modules/zlib/deflate.h | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/Modules/zlib/deflate.h b/Modules/zlib/deflate.h index 05a5ab3..cbf0d1e 100644 --- a/Modules/zlib/deflate.h +++ b/Modules/zlib/deflate.h @@ -1,5 +1,5 @@ /* deflate.h -- internal compression state - * Copyright (C) 1995-2004 Jean-loup Gailly + * Copyright (C) 1995-2010 Jean-loup Gailly * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -260,6 +260,13 @@ typedef struct internal_state { * are always zero. */ + ulg high_water; + /* High water mark offset in window for initialized bytes -- bytes above + * this are set to zero in order to avoid memory check warnings when + * longest match routines access bytes past the input. This is then + * updated to the new high water mark. + */ + } FAR deflate_state; /* Output a byte on the stream. @@ -278,14 +285,18 @@ typedef struct internal_state { * distances are limited to MAX_DIST instead of WSIZE. */ +#define WIN_INIT MAX_MATCH +/* Number of bytes after end of data in window to initialize in order to avoid + memory checker errors from longest match routines */ + /* in trees.c */ -void _tr_init OF((deflate_state *s)); -int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc)); -void _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len, - int eof)); -void _tr_align OF((deflate_state *s)); -void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len, - int eof)); +void ZLIB_INTERNAL _tr_init OF((deflate_state *s)); +int ZLIB_INTERNAL _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc)); +void ZLIB_INTERNAL _tr_flush_block OF((deflate_state *s, charf *buf, + ulg stored_len, int last)); +void ZLIB_INTERNAL _tr_align OF((deflate_state *s)); +void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf, + ulg stored_len, int last)); #define d_code(dist) \ ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)]) @@ -298,11 +309,11 @@ void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len, /* Inline versions of _tr_tally for speed: */ #if defined(GEN_TREES_H) || !defined(STDC) - extern uch _length_code[]; - extern uch _dist_code[]; + extern uch ZLIB_INTERNAL _length_code[]; + extern uch ZLIB_INTERNAL _dist_code[]; #else - extern const uch _length_code[]; - extern const uch _dist_code[]; + extern const uch ZLIB_INTERNAL _length_code[]; + extern const uch ZLIB_INTERNAL _dist_code[]; #endif # define _tr_tally_lit(s, c, flush) \ |