We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c1e0ef commit 1b7dad1Copy full SHA for 1b7dad1
Doc/library/zlib.rst
@@ -308,6 +308,11 @@ Decompression objects support the following methods and attributes:
308
:attr:`unconsumed_tail`. This bytestring must be passed to a subsequent call to
309
:meth:`decompress` if decompression is to continue. If *max_length* is zero
310
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))
316
317
.. versionchanged:: 3.6
318
*max_length* can be used as a keyword argument.
0 commit comments