aboutsummaryrefslogtreecommitdiff
path: root/lib/libz/deflate.h
diff options
context:
space:
mode:
authorTim J. Robbins <tjr@FreeBSD.org>2004-06-30 23:43:39 +0000
committerTim J. Robbins <tjr@FreeBSD.org>2004-06-30 23:43:39 +0000
commitaea8f65dfe9fa61c3931b893695b8b4fe57274df (patch)
tree27166b9fb424eff5ad7278cc00e871d387fd9c2f /lib/libz/deflate.h
parentcdbc2952f3c7d8c5993b21348ba22c7fc21a0d7e (diff)
downloadsrc-aea8f65dfe9fa61c3931b893695b8b4fe57274df.tar.gz
src-aea8f65dfe9fa61c3931b893695b8b4fe57274df.zip
Import zlib 1.2.1 (trimmed)
Notes
Notes: svn path=/vendor/libz/dist/; revision=131377
Diffstat (limited to 'lib/libz/deflate.h')
-rw-r--r--lib/libz/deflate.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/lib/libz/deflate.h b/lib/libz/deflate.h
index b99a48a52142..e31f66be5215 100644
--- a/lib/libz/deflate.h
+++ b/lib/libz/deflate.h
@@ -1,6 +1,6 @@
/* deflate.h -- internal compression state
* Copyright (C) 1995-2002 Jean-loup Gailly
- * For conditions of distribution and use, see copyright notice in zlib.h
+ * For conditions of distribution and use, see copyright notice in zlib.h
*/
/* WARNING: this file should *not* be used by applications. It is
@@ -10,11 +10,19 @@
/* @(#) $Id$ */
-#ifndef _DEFLATE_H
-#define _DEFLATE_H
+#ifndef DEFLATE_H
+#define DEFLATE_H
#include "zutil.h"
+/* define NO_GZIP when compiling if you want to disable gzip header and
+ trailer creation by deflate(). NO_GZIP would be used to avoid linking in
+ the crc code when it is not needed. For shared libraries, gzip encoding
+ should be left enabled. */
+#ifndef NO_GZIP
+# define GZIP
+#endif
+
/* ===========================================================================
* Internal compression state.
*/
@@ -86,7 +94,7 @@ typedef struct internal_state {
ulg pending_buf_size; /* size of pending_buf */
Bytef *pending_out; /* next pending byte to output to the stream */
int pending; /* nb of bytes in the pending buffer */
- int noheader; /* suppress zlib header and adler32 */
+ int wrap; /* bit 0 true for zlib, bit 1 true for gzip */
Byte data_type; /* UNKNOWN, BINARY or ASCII */
Byte method; /* STORED (for zip only) or DEFLATED */
int last_flush; /* value of flush param for previous deflate call */
@@ -269,7 +277,7 @@ typedef struct internal_state {
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));
+ int eof));
void _tr_align OF((deflate_state *s));
void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
int eof));
@@ -312,7 +320,7 @@ void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
#else
# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
# define _tr_tally_dist(s, distance, length, flush) \
- flush = _tr_tally(s, distance, length)
+ flush = _tr_tally(s, distance, length)
#endif
-#endif
+#endif /* DEFLATE_H */