diff options
author | Ronald Oussoren <ronaldoussoren@mac.com> | 2006-06-15 08:14:18 +0000 |
---|---|---|
committer | Ronald Oussoren <ronaldoussoren@mac.com> | 2006-06-15 08:14:18 +0000 |
commit | 143cefb8461c2c684e904723be45f84d2c998466 (patch) | |
tree | 0ce1d5bba4691e8292f4d4deb278aa5a57bdb589 /Doc/lib/libzipfile.tex | |
parent | 0eac11826a6b9efed2f52b612e58046c584db573 (diff) | |
download | cpython-git-143cefb8461c2c684e904723be45f84d2c998466.tar.gz |
Patch #1446489 (zipfile: support for ZIP64)
Diffstat (limited to 'Doc/lib/libzipfile.tex')
-rw-r--r-- | Doc/lib/libzipfile.tex | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/Doc/lib/libzipfile.tex b/Doc/lib/libzipfile.tex index 4e06ef692e..d7c08f6ae5 100644 --- a/Doc/lib/libzipfile.tex +++ b/Doc/lib/libzipfile.tex @@ -17,7 +17,8 @@ understanding of the format, as defined in Note}. This module does not currently handle ZIP files which have appended -comments, or multi-disk ZIP files. +comments, or multi-disk ZIP files. It can handle ZIP files that use the +ZIP64 extensions (that is ZIP files that are more than 4 GByte in size). The available attributes of this module are: @@ -25,6 +26,11 @@ The available attributes of this module are: The error raised for bad ZIP files. \end{excdesc} +\begin{excdesc}{LargeZipFile} + The error raised when a ZIP file would require ZIP64 functionality but that + has not been enabled. +\end{excdesc} + \begin{classdesc*}{ZipFile} The class for reading and writing ZIP files. See ``\citetitle{ZipFile Objects}'' (section \ref{zipfile-objects}) for @@ -77,7 +83,7 @@ The available attributes of this module are: \subsection{ZipFile Objects \label{zipfile-objects}} -\begin{classdesc}{ZipFile}{file\optional{, mode\optional{, compression}}} +\begin{classdesc}{ZipFile}{file\optional{, mode\optional{, compression\optional{, allowZip64}}}} Open a ZIP file, where \var{file} can be either a path to a file (a string) or a file-like object. The \var{mode} parameter should be \code{'r'} to read an existing file, \code{'w'} to @@ -100,6 +106,12 @@ cat myzip.zip >> python.exe is specified but the \refmodule{zlib} module is not available, \exception{RuntimeError} is also raised. The default is \constant{ZIP_STORED}. + If \var{allowZip64} is \code{True} zipfile will create zipfiles that use + the ZIP64 extensions when the zipfile is larger than 2GBytes. If it is + false (the default) zipfile will raise an exception when the zipfile would + require ZIP64 extensions. ZIP64 extensions are disabled by default because + the default zip and unzip commands on Unix (the InfoZIP utilities) don't + support these extensions. \end{classdesc} \begin{methoddesc}{close}{} @@ -132,8 +144,8 @@ cat myzip.zip >> python.exe \end{methoddesc} \begin{methoddesc}{testzip}{} - Read all the files in the archive and check their CRC's. Return the - name of the first bad file, or else return \code{None}. + Read all the files in the archive and check their CRC's and file + headers. Return the name of the first bad file, or else return \code{None}. \end{methoddesc} \begin{methoddesc}{write}{filename\optional{, arcname\optional{, @@ -284,10 +296,6 @@ Instances have the following attributes: Byte offset to the file header. \end{memberdesc} -\begin{memberdesc}[ZipInfo]{file_offset} - Byte offset to the start of the file data. -\end{memberdesc} - \begin{memberdesc}[ZipInfo]{CRC} CRC-32 of the uncompressed file. \end{memberdesc} |