mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Patch #1435422: zlib's compress and decompress objects now have a
copy() method.
This commit is contained in:
parent
5f5d99c215
commit
8d3342b489
4 changed files with 175 additions and 0 deletions
|
|
@ -123,6 +123,12 @@ prevents compressing any more data. After calling
|
|||
action is to delete the object.
|
||||
\end{methoddesc}
|
||||
|
||||
\begin{methoddesc}[Compress]{copy}{}
|
||||
Returns a copy of the compression object. This can be used to efficiently
|
||||
compress a set of data that share a common initial prefix.
|
||||
\versionadded{2.5}
|
||||
\end{methoddesc}
|
||||
|
||||
Decompression objects support the following methods, and two attributes:
|
||||
|
||||
\begin{memberdesc}{unused_data}
|
||||
|
|
@ -176,6 +182,13 @@ The optional parameter \var{length} sets the initial size of the
|
|||
output buffer.
|
||||
\end{methoddesc}
|
||||
|
||||
\begin{methoddesc}[Decompress]{copy}{}
|
||||
Returns a copy of the decompression object. This can be used to save the
|
||||
state of the decompressor midway through the data stream in order to speed up
|
||||
random seeks into the stream at a future point.
|
||||
\versionadded{2.5}
|
||||
\end{methoddesc}
|
||||
|
||||
\begin{seealso}
|
||||
\seemodule{gzip}{Reading and writing \program{gzip}-format files.}
|
||||
\seeurl{http://www.zlib.net}{The zlib library home page.}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue