about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-11-13 16:17:30 -0500
committerJune McEnroe <june@causal.agency>2018-11-13 16:17:43 -0500
commit6c6d1eb57886d9758021252ed43901e0e96b6102 (patch)
treecffb8b51bab7bc8e7654454a3712b17eaad261a3
parentFix spacing after parenthetical sentences (diff)
downloadzlib-man-pages-6c6d1eb57886d9758021252ed43901e0e96b6102.tar.gz
zlib-man-pages-6c6d1eb57886d9758021252ed43901e0e96b6102.zip
Add gzflush.3
-rw-r--r--Makefile1
-rw-r--r--gzflush.357
2 files changed, 58 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 0f10616..0518b4b 100644
--- a/Makefile
+++ b/Makefile
@@ -19,6 +19,7 @@ MAN += deflateSetDictionary.3
 MAN += deflateSetHeader.3
 MAN += deflateTune.3
 MAN += gzbuffer.3
+MAN += gzflush.3
 MAN += gzfread.3
 MAN += gzfwrite.3
 MAN += gzgetc.3
diff --git a/gzflush.3 b/gzflush.3
new file mode 100644
index 0000000..b038556
--- /dev/null
+++ b/gzflush.3
@@ -0,0 +1,57 @@
+.Dd November 13, 2018
+.Dt GZFLUSH 3
+.Os
+.
+.Sh NAME
+.Nm gzflush
+.Nd flush output to compressed file
+.
+.Sh LIBRARY
+.Lb libz
+.
+.Sh SYNOPSIS
+.In zlib.h
+.Ft int
+.Fn gzflush "gzFile file" "int flush"
+.
+.Sh DESCRIPTION
+Flushes all pending output
+into the compressed file.
+The parameter
+.Fa flush
+is as in the
+.Xr deflate 3
+function.
+.Fn gzflush
+is only permitted when writing.
+.
+.Pp
+If the
+.Fa flush
+parameter is
+.Dv Z_FINISH ,
+the remaining data is written
+and the gzip stream
+is completed in the output.
+If
+.Xr gzwrite 3
+is called again,
+a new gzip stream
+will be started in the output.
+.Xr gzread 3
+is able to read
+such concatenated gzip streams.
+.
+.Pp
+.Fn gzflush
+should be called only when strictly necessary
+because it will degrade compression
+if called too often.
+.
+.Sh RETURN VALUE
+The return value
+is the zlib error number
+.Po
+see function
+.Xr gzerror 3
+.Pc .