Gio.ZlibCompressor - Classes - Gio 2.0 (original) (raw)

g GObject.GInterface GObject.GInterface Gio.Converter Gio.Converter GObject.GInterface->Gio.Converter GObject.Object GObject.Object Gio.ZlibCompressor Gio.ZlibCompressor GObject.Object->Gio.ZlibCompressor Gio.Converter->Gio.ZlibCompressor

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Gio.Converter (3)

Structs:

GObject.ObjectClass (5)

class new (format, level)
get_file_info ()
set_file_info (file_info)

Virtual Methods

Inherited:

GObject.Object (7), Gio.Converter (2)

Properties

Name Type Flags Short Description
file-info Gio.FileInfo r/w
format Gio.ZlibCompressorFormat r/w/co
level int r/w/co

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Gio.ZlibCompressor(**kwargs)

Bases:

GObject.Object, Gio.Converter

Abstract:

No

Structure:

Gio.ZlibCompressorClass

GZlibCompressor is an implementation of [iface`Gio`.Converter] that compresses data using zlib.

classmethod new(format, level)[source]

Parameters:

Returns:

a new Gio.ZlibCompressor

Return type:

Gio.ZlibCompressor

Creates a new Gio.ZlibCompressor.

New in version 2.24.

get_file_info()[source]

Returns:

a Gio.FileInfo, or None

Return type:

Gio.FileInfo or None

Returns the Gio.ZlibCompressor :file-info property.

New in version 2.26.

set_file_info(file_info)[source]

Parameters:

file_info (Gio.FileInfo or None) – a Gio.FileInfo

Sets file_info in self. If non-None, and self'sGio.ZlibCompressor :format property is 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 self, or after resetting it with Gio.Converter.reset().

New in version 2.26.

Property Details

Gio.ZlibCompressor.props.file_info

Name:

file-info

Type:

Gio.FileInfo

Default Value:

None

Flags:

READABLE, WRITABLE

If set to a non-None Gio.FileInfo object, and Gio.ZlibCompressor :format isGio.ZlibCompressorFormat.GZIP, the compressor will write the file name and modification time from the file info to the GZIP header.

New in version 2.26.

Gio.ZlibCompressor.props.format

Name:

format

Type:

Gio.ZlibCompressorFormat

Default Value:

Gio.ZlibCompressorFormat.ZLIB

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The format of the compressed data.

New in version 2.24.

Gio.ZlibCompressor.props.level

Name:

level

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The level of compression from 0 (no compression) to 9 (most compression). -1 for the default level.

New in version 2.24.