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:
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:
Fields¶
Inherited:
Class Details¶
class Gio.ZlibCompressor(**kwargs)¶
Bases:
Abstract:
No
Structure:
GZlibCompressor
is an implementation of [iface`Gio`.Converter] that compresses data using zlib.
classmethod new(format, level)[source]¶
Parameters:
- format (Gio.ZlibCompressorFormat) – The format to use for the compressed data
- level (int) – compression level (0-9), -1 for default
Returns:
a new Gio.ZlibCompressor
Return type:
Creates a new Gio.ZlibCompressor.
New in version 2.24.
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:
Default Value:
Flags:
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:
Default Value:
Flags:
READABLE, WRITABLE, CONSTRUCT_ONLY
The format of the compressed data.
New in version 2.24.
Gio.ZlibCompressor.props.level¶
Name:
level
Type:
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.