:right-sidebar: True ZlibCompressor =================================================================== .. currentmodule:: gi.repository.Gio .. class:: ZlibCompressor(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gio.Converter` ``GZlibCompressor`` is an implementation of :obj:`~gi.repository.Gio.Converter` that compresses data using zlib. Constructors ------------ .. rst-class:: interim-class .. class:: ZlibCompressor :no-index: .. classmethod:: new(format: ~gi.repository.Gio.ZlibCompressorFormat, level: int) -> ~gi.repository.Gio.ZlibCompressor Creates a new :obj:`~gi.repository.Gio.ZlibCompressor`\. .. versionadded:: 2.24 :param format: The format to use for the compressed data :param level: compression level (0-9), -1 for default Methods ------- .. rst-class:: interim-class .. class:: ZlibCompressor :no-index: .. method:: get_file_info() -> ~gi.repository.Gio.FileInfo | None Returns the :obj:`~gi.repository.Gio.ZlibCompressor`\:file-info property. .. versionadded:: 2.26 .. method:: set_file_info(file_info: ~gi.repository.Gio.FileInfo | None = None) -> None Sets ``file_info`` in ``compressor``\. If non-:const:`None`, and ``compressor``\'s :obj:`~gi.repository.Gio.ZlibCompressor`\:format property is :const:`~gi.repository.Gio.ZlibCompressorFormat.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 :func:`~gi.repository.Gio.Converter.reset`. .. versionadded:: 2.26 :param file_info: a :obj:`~gi.repository.Gio.FileInfo` Properties ---------- .. rst-class:: interim-class .. class:: ZlibCompressor :no-index: .. attribute:: props.file_info :type: ~gi.repository.Gio.FileInfo The type of the None singleton. .. versionadded:: 2.26 .. attribute:: props.format :type: ~gi.repository.Gio.ZlibCompressorFormat The type of the None singleton. .. versionadded:: 2.24 .. attribute:: props.level :type: int The type of the None singleton. .. versionadded:: 2.24