Skip to content

Commit 1b7dad1

Browse files
Update zlib.rst
1 parent 3c1e0ef commit 1b7dad1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Doc/library/zlib.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,11 @@ Decompression objects support the following methods and attributes:
308308
:attr:`unconsumed_tail`. This bytestring must be passed to a subsequent call to
309309
:meth:`decompress` if decompression is to continue. If *max_length* is zero
310310
then the whole input is decompressed, and :attr:`unconsumed_tail` is empty.
311+
For example, the complete body could be read like::
312+
313+
process_output(d.decompress(data, max_length))
314+
while d.unconsumed_tail:
315+
process_output(d.decompress(d.unconsumed_tail, max_length))
311316

312317
.. versionchanged:: 3.6
313318
*max_length* can be used as a keyword argument.

0 commit comments

Comments
 (0)