ZlibCompressor#

class ZlibCompressor(**properties: Any)#

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_info in compressor. If non-None, and compressor's ZlibCompressor:format property is GZIP, 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 with reset().

Added in version 2.26.

Parameters:

file_info – a FileInfo

Properties#

class ZlibCompressor
props.file_info: FileInfo#

The type of the None singleton.

Added in version 2.26.

props.format: ZlibCompressorFormat#

The type of the None singleton.

Added in version 2.24.

props.level: int#

The type of the None singleton.

Added in version 2.24.