@@ -123,24 +123,29 @@ \section{\module{zlib} ---
123123Decompression objects support the following methods, and two attributes:
124124
125125\begin {memberdesc }{unused_data}
126- A string which contains any unused data from the last string fed to
127- this decompression object. If the whole string turned out to contain
128- compressed data, this is \code {""}, the empty string.
126+ A string which contains any bytes past the end of the compressed data.
127+ That is, this remains \code {""} until the last byte that contains
128+ compression data is available. If the whole string turned out to
129+ contain compressed data, this is \code {""}, the empty string.
129130
130131The only way to determine where a string of compressed data ends is by
131132actually decompressing it. This means that when compressed data is
132133contained part of a larger file, you can only find the end of it by
133- reading data and feeding it into a decompression object's
134- \method {decompress} method until the \member {unused_data} attribute is
135- no longer the empty string.
134+ reading data and feeding it followed by some non-empty string into a
135+ decompression object's \method {decompress} method until the
136+ \member {unused_data} attribute is no longer the empty string.
136137\end {memberdesc }
137138
138139\begin {memberdesc }{unconsumed_tail}
139140A string that contains any data that was not consumed by the last
140141\method {decompress} call because it exceeded the limit for the
141- uncompressed data buffer.
142+ uncompressed data buffer. This data has not yet been seen by the zlib
143+ machinery, so you must feed it (possibly with further data
144+ concatenated to it) back to a subsequent \method {decompress} method
145+ call in order to get correct output.
142146\end {memberdesc }
143147
148+
144149\begin {methoddesc }[Decompress]{decompress}{string}{\optional {max_length}}
145150Decompress \var {string}, returning a string containing the
146151uncompressed data corresponding to at least part of the data in
0 commit comments