Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f07c328

Browse files
committed
Document the optional mode argument (Z_FLUSH, Z_SYNC_FLUSH, etc.)
to the flush() method of compressor objects.
1 parent c0ef565 commit f07c328

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

Doc/lib/libzlib.tex

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,18 @@ \section{\module{zlib} ---
8787
for later processing.
8888
\end{methoddesc}
8989

90-
\begin{methoddesc}[Compress]{flush}{}
91-
All pending input is processed, and an string containing the remaining
92-
compressed output is returned. After calling \method{flush()}, the
90+
\begin{methoddesc}[Compress]{flush}{\optional{mode}}
91+
All pending input is processed, and a string containing the remaining
92+
compressed output is returned. \var{mode} can be selected from the
93+
constants \constant{Z_SYNC_FLUSH}, \constant{Z_FULL_FLUSH}, or
94+
\constant{Z_FINISH}, defaulting to \constant{Z_FINISH}. \constant{Z_SYNC_FLUSH} and
95+
\constant{Z_FULL_FLUSH} allow compressing further strings of data and
96+
are used to allow partial error recovery on decompression, while
97+
\constant{Z_FINISH} finishes the compressed stream and
98+
prevents compressing any more data. After calling
99+
\method{flush()} with \var{mode} set to \constant{Z_FINISH}, the
93100
\method{compress()} method cannot be called again; the only realistic
94-
action is to delete the object.
101+
action is to delete the object.
95102
\end{methoddesc}
96103

97104
Decompression objects support the following methods:

0 commit comments

Comments
 (0)