Gio.ZlibCompressor¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w |
|||
r/w/co |
|||
r/w/co |
|||
r/w/en |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Gio.ZlibCompressor(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
GZlibCompressoris 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 datalevel (
int) – compression level (0-9),-1for default
- Returns:
a new [class`Gio`.ZlibCompressor]
- Return type:
Creates a compressor.
New in version 2.24.
- get_file_info()[source]¶
- Returns:
file info for the gzip header, if set
- Return type:
Gio.FileInfoorNone
Gets the [property`Gio`.ZlibCompressor:file-info] property.
New in version 2.26.
- get_os()[source]¶
- Returns:
the previously set OS value, or
-1if unset- Return type:
Gets the [property`Gio`.ZlibCompressor:os] property.
New in version 2.86.
- set_file_info(file_info)[source]¶
- Parameters:
file_info (
Gio.FileInfoorNone) – file info for the gzip header
Sets the [property`Gio`.ZlibCompressor:file-info] property.
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 [method`Gio`.Converter.reset].
New in version 2.26.
- set_os(os)[source]¶
- Parameters:
os (
int) – the OS code to use, or-1to unset
Sets the [property`Gio`.ZlibCompressor:os] property.
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 [method`Gio`.Converter.reset].
New in version 2.86.
Property Details¶
- Gio.ZlibCompressor.props.file_info¶
- Name:
file-info- Type:
- Default Value:
- Flags:
A [class`Gio`.FileInfo] containing file information to put into the gzip header.
The file name and modification time from the file info will be used.
This will only be used if non-
NULLand [property`Gio`.ZlibCompressor:format] is [enum`Gio`.ZlibCompressorFormat.GZIP].New in version 2.26.
- Gio.ZlibCompressor.props.format¶
- Name:
format- Type:
- Default Value:
- Flags:
The format of the compressed data.
New in version 2.24.
- Gio.ZlibCompressor.props.level¶
- Name:
level- Type:
- Default Value:
-1- Flags:
The level of compression from
0(no compression) to9(most compression).-1for the default level.New in version 2.24.
- Gio.ZlibCompressor.props.os¶
- Name:
os- Type:
- Default Value:
-1- Flags:
The OS code of the gzip header.
This will be used if set to a non-negative value, and if [property`Gio`.ZlibCompressor:format] is [enum`Gio`.ZlibCompressorFormat.GZIP], the compressor will set the OS code of the gzip header to this value.
If the value is unset, zlib will set the OS code depending on the platform. This may be undesirable when reproducible output is desired. In that case setting the OS code to
3(for Unix) is recommended.New in version 2.86.