zlib.compress()

zlib.compress(data[, level]) Compresses the bytes in data, returning a bytes object containing compressed data. level is an integer from 0 to 9 controlling the level of compression; 1 is fastest and produces the least compression, 9 is slowest and produces the most. 0 is no compression. The default value is 6. Raises the error exception if any error occurs.

zipimport.ZipImportError

exception zipimport.ZipImportError Exception raised by zipimporter objects. It’s a subclass of ImportError, so it can be caught as ImportError, too.

zlib.Compress.compress()

Compress.compress(data) Compress data, returning a bytes object containing compressed data for at least part of the data in data. This data should be concatenated to the output produced by any preceding calls to the compress() method. Some input may be kept in internal buffers for later processing.

zlib.Compress.copy()

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.

zlib.adler32()

zlib.adler32(data[, value]) Computes an Adler-32 checksum of data. (An Adler-32 checksum is almost as reliable as a CRC32 but can be computed much more quickly.) The result is an unsigned 32-bit integer. If value is present, it is used as the starting value of the checksum; otherwise, a default value of 1 is used. Passing in value allows computing a running checksum over the concatenation of several inputs. The algorithm is not cryptographically strong, and should not be used for authenticat

zipimport.zipimporter.is_package()

is_package(fullname) Return True if the module specified by fullname is a package. Raise ZipImportError if the module couldn’t be found.

zipimport.zipimporter.get_source()

get_source(fullname) Return the source code for the specified module. Raise ZipImportError if the module couldn’t be found, return None if the archive does contain the module, but has no source for it.

zipimport.zipimporter.find_module()

find_module(fullname[, path]) Search for a module specified by fullname. fullname must be the fully qualified (dotted) module name. It returns the zipimporter instance itself if the module was found, or None if it wasn’t. The optional path argument is ignored—it’s there for compatibility with the importer protocol.

zipimport.zipimporter.get_data()

get_data(pathname) Return the data associated with pathname. Raise OSError if the file wasn’t found. Changed in version 3.3: IOError used to be raised instead of OSError.

zipimport.zipimporter.get_filename()

get_filename(fullname) Return the value __file__ would be set to if the specified module was imported. Raise ZipImportError if the module couldn’t be found. New in version 3.1.