## GZlibCompressor

GZlibCompressor — Zlib compressor

## Synopsis

    #include <gio/gio.h>

                        GZlibCompressor;
    enum                GZlibCompressorFormat;
    GZlibCompressor *   g_zlib_compressor_new               (GZlibCompressorFormat format,
                                                             int level);

## Object Hierarchy

      GObject
       +----GZlibCompressor

## Implemented Interfaces

GZlibCompressor implements GConverter.

## Properties

      "format"                   GZlibCompressorFormat  : Read / Write / Construct Only
      "level"                    gint                  : Read / Write / Construct Only

## Description

GZlibCompressor is an implementation of GConverter that compresses data using zlib.

## Details

### GZlibCompressor

    typedef struct _GZlibCompressor GZlibCompressor;

Zlib decompression

### enum GZlibCompressorFormat

    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.

`G_ZLIB_COMPRESSOR_FORMAT_ZLIB` | deflate compression with zlib header
`G_ZLIB_COMPRESSOR_FORMAT_GZIP` | gzip file format
`G_ZLIB_COMPRESSOR_FORMAT_RAW` | deflate compression with no header

Since 2.24

### g_zlib_compressor_new ()

    GZlibCompressor *   g_zlib_compressor_new               (GZlibCompressorFormat format,
                                                             int level);

Creates a new GZlibCompressor.

`format` : | The format to use for the compressed data
`level` : | compression level (0-9), -1 for default
Returns : | a new GZlibCompressor

Since 2.24

## Property Details

### The `"format"` property

      "format"                   GZlibCompressorFormat  : Read / Write / Construct Only

The format of the compressed data.

Default value: G_ZLIB_COMPRESSOR_FORMAT_ZLIB

### The `"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