GIO Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
#include <gio/gio.h> GZlibCompressor; enum GZlibCompressorFormat; GZlibCompressor * g_zlib_compressor_new (GZlibCompressorFormat format
,int level
); GFileInfo * g_zlib_compressor_get_file_info (GZlibCompressor *compressor
); void g_zlib_compressor_set_file_info (GZlibCompressor *compressor
,GFileInfo *file_info
);
"file-info" GFileInfo* : Read / Write "format" GZlibCompressorFormat : Read / Write / Construct Only "level" gint : Read / Write / Construct Only
typedef enum { G_ZLIB_COMPRESSOR_FORMAT_ZLIB, G_ZLIB_COMPRESSOR_FORMAT_GZIP, G_ZLIB_COMPRESSOR_FORMAT_RAW } GZlibCompressorFormat;
Used to select the type of data format to use for GZlibDecompressor and GZlibCompressor.
deflate compression with zlib header | |
gzip file format | |
deflate compression with no header |
Since 2.24
GZlibCompressor * g_zlib_compressor_new (GZlibCompressorFormat format
,int level
);
Creates a new GZlibCompressor.
|
The format to use for the compressed data |
|
compression level (0-9), -1 for default |
Returns : |
a new GZlibCompressor |
Since 2.24
GFileInfo * g_zlib_compressor_get_file_info (GZlibCompressor *compressor
);
Returns the "file-info" property.
|
a GZlibCompressor |
Returns : |
a GFileInfo, or NULL . [transfer none]
|
Since 2.26
void g_zlib_compressor_set_file_info (GZlibCompressor *compressor
,GFileInfo *file_info
);
Sets file_info
in compressor
. If non-NULL
, and compressor
's
"format" property is G_ZLIB_COMPRESSOR_FORMAT_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 g_converter_reset()
.
|
a GZlibCompressor |
|
a GFileInfo. [allow-none] |
Since 2.26
"file-info"
property"file-info" GFileInfo* : Read / Write
If set to a non-NULL
GFileInfo object, and "format" is
G_ZLIB_COMPRESSOR_FORMAT_GZIP
, the compressor will write the file name
and modification time from the file info to the the GZIP header.
Since 2.26
"format"
property"format" GZlibCompressorFormat : Read / Write / Construct Only
The format of the compressed data.
Default value: G_ZLIB_COMPRESSOR_FORMAT_ZLIB
"level"
property"level" gint : Read / Write / Construct Only
The level of compression from 0 (no compression) to 9 (most compression), -1 for the default level.
Allowed values: [G_MAXULONG,9]
Default value: -1