about summary refs log tree commit diff homepage
path: root/deflate.3
diff options
context:
space:
mode:
Diffstat (limited to 'deflate.3')
-rw-r--r--deflate.380
1 files changed, 80 insertions, 0 deletions
diff --git a/deflate.3 b/deflate.3
index f25b78e..0dcd28a 100644
--- a/deflate.3
+++ b/deflate.3
@@ -21,6 +21,86 @@
 .Fn deflateEnd "z_streamp strm"
 .
 .Sh DESCRIPTION
+The
+.Vt z_streamp
+type is defined as follows:
+.
+.Bd -literal -offset indent
+typedef voidpf (*alloc_func) (voidpf opaque, uInt items, uInt size);
+typedef void   (*free_func)  (voidpf opaque, voidpf address);
+
+typedef struct z_stream_s {
+	z_const Bytef *next_in;
+	uInt     avail_in;
+	uLong    total_in;
+	
+	Bytef    *next_out;
+	uInt     avail_out;
+	uLong    total_out;
+	
+	z_const char *msg;
+	struct internal_state FAR *state;
+	
+	alloc_func zalloc;
+	free_func  zfree;
+	voidpf     opaque;
+	
+	int     data_type;
+	uLong   adler;
+	uLong   reserved;
+} z_stream;
+
+typedef z_stream FAR *z_streamp;
+.Ed
+.
+.Pp
+The fields of
+.Vt z_stream
+are as follows:
+.
+.Bl -tag -width "data_type"
+.It Fa next_in
+next input byte
+.It Fa avail_in
+number of bytes available at
+.Fa next_in
+.It Fa total_in
+total number of input bytes read so far
+.It Fa next_out
+next output byte will go here
+.It Fa avail_out
+remaining free space at
+.Fa next_out
+.It Fa total_out
+total number of bytes output so far
+.It Fa msg
+last error message,
+.Dv NULL
+if no error
+.It Fa state
+not visible by applications
+.It Fa zalloc
+used to allocate the internal state
+.It Fa zfree
+used to free the internal state
+.It Fa opaque
+private data object passed to
+.Fa zalloc
+and
+.Fa zfree
+.It data_type
+best guess about the data type:
+binary or text for
+.Fn deflate ,
+or the decoding state for
+.Xr inflate 3
+.It adler
+Adler-32 or CRC-32 value of the uncompressed data
+.It reserved
+reserved for future use
+.El
+.
+.Pp
 .Fn deflateInit
 initializes the internal stream state for compression.
 The fields