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.

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.ZipImportError

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

zipimport.zipimporter.prefix

prefix The subpath within the ZIP file where modules are searched. This is the empty string for zipimporter objects which point to the root of the ZIP file.

zipimport.zipimporter.load_module()

load_module(fullname) Load the module specified by fullname. fullname must be the fully qualified (dotted) module name. It returns the imported module, or raises ZipImportError if it wasn’t found.

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.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.

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_code()

get_code(fullname) Return the code object for the specified module. Raise ZipImportError if the module couldn’t be found.