ZlibCompressor#
Superclasses: Object
Implemented Interfaces: Converter
GZlibCompressor is an implementation of Converter that
compresses data using zlib.
Constructors#
- class ZlibCompressor
- classmethod new(format: ZlibCompressorFormat, level: int) ZlibCompressor#
Creates a new
ZlibCompressor.Added in version 2.24.
- Parameters:
format – The format to use for the compressed data
level – compression level (0-9), -1 for default
Methods#
- class ZlibCompressor
- get_file_info() FileInfo | None#
Returns the
ZlibCompressor:file-info property.Added in version 2.26.
- set_file_info(file_info: FileInfo | None = None) None#
Sets
file_infoincompressor. If non-None, andcompressor'sZlibCompressor:format property isGZIP, it will be used to set the file name and modification time in the GZIP header of the compressed data.Note: it is an error to call this function while a compression is in progress; it may only be called immediately after creation of
compressor, or after resetting it withreset().Added in version 2.26.
- Parameters:
file_info – a
FileInfo