Module t.p.zipstream

Part of twisted.python View Source

An extremely asynch approach to unzipping files. This allows you to unzip a little bit of a file at a time, which means it can integrate nicely with a reactor.
Class ChunkingZipFile A ZipFile object which, with readfile(), also gives you access
Class ZipFileEntry File-like object used to read an uncompressed entry in a ZipFile
Class DeflatedZipFileEntry File-like object used to read a deflated entry in a ZipFile
Function unzip Unzip the file
Function unzipIter Return a generator for the zipfile. This implementation will
Function countZipFileChunks Predict the number of chunks that will be extracted from the
Function countFileChunks Undocumented
Function countZipFileEntries Undocumented
Function unzipIterChunky Return a generator for the zipfile. This implementation will
def unzip(filename, directory='.', overwrite=0): (source)
Unzip the file
Parametersfilenamethe name of the zip file
directorythe directory into which the files will be extracted
overwriteif on, overwrite files when they exist. You can still get an error if you try to create a directory over a file with the same name or vice-versa.
def unzipIter(filename, directory='.', overwrite=0): (source)

Return a generator for the zipfile. This implementation will yield after every file.

The value it yields is the number of files left to unzip.
def countZipFileChunks(filename, chunksize): (source)
Predict the number of chunks that will be extracted from the entire zipfile, given chunksize blocks.
def countFileChunks(zipinfo, chunksize): (source)
Undocumented
def countZipFileEntries(filename): (source)
Undocumented
def unzipIterChunky(filename, directory='.', overwrite=0, chunksize=4096): (source)

Return a generator for the zipfile. This implementation will yield after every chunksize uncompressed bytes, or at the end of a file, whichever comes first.

The value it yields is the number of chunks left to unzip.
API Documentation for twisted, generated by pydoctor.