Compression: GSF Reference Manual

## Compression Compression |

## Functions

GsfInput * | gsf_input_gzip_new ()
GsfInput * | gsf_input_memory_new_from_bzip ()
GsfOutput * | gsf_output_gzip_new ()
GsfOutput * | gsf_output_bzip_new ()

## Properties

gboolean | raw | Read / Write / Construct Only
GsfInput * | source | Read / Write / Construct Only
gint64 | uncompressed-size | Read / Write / Construct Only
gint | deflate-level | Read / Write
gboolean | raw | Read / Write / Construct Only
GsfOutput * | sink | Read / Write / Construct Only

## Types and Values

| GsfInputGZip
| GsfOutputGZip
| GsfOutputBzip

## Object Hierarchy

        GObject
        ├── GsfInput
        │   ╰── GsfInputGZip
        ╰── GsfOutput
            ├── GsfOutputBzip
            ╰── GsfOutputGZip

## Description

## Functions

### gsf_input_gzip_new ()

    GsfInput *
    gsf_input_gzip_new (GsfInput *source,
                        GError **err);

Adds a reference to `source` .

#### Parameters

source | The underlying data source. |
err | place to store a GError if anything goes wrong. | [allow-none]

#### Returns

a new file or `NULL`.

### gsf_input_memory_new_from_bzip ()

    GsfInput *
    gsf_input_memory_new_from_bzip (GsfInput *source,
                                    GError **err);

#### Parameters

source | a GsfInput |
err | place to store a GError if anything goes wrong. | [allow-none]

#### Returns

a new GsfInputMemory or `NULL`.

### gsf_output_gzip_new ()

    GsfOutput *
    gsf_output_gzip_new (GsfOutput *sink,
                         GError **err);

Adds a reference to `sink` .

#### Parameters

sink | The underlying data source. |
err | optionally `NULL`. |

#### Returns

a new file or `NULL`.

### gsf_output_bzip_new ()

    GsfOutput *
    gsf_output_bzip_new (GsfOutput *sink,
                         GError **err);

Adds a reference to `sink` .

#### Parameters

sink | The underlying data source. |
err | optionally `NULL`. |

#### Returns

a new file or `NULL`.

## Types and Values

### GsfInputGZip

    typedef struct _GsfInputGZip GsfInputGZip;

### GsfOutputGZip

    typedef struct _GsfOutputGZip GsfOutputGZip;

### GsfOutputBzip

    typedef struct _GsfOutputBzip GsfOutputBzip;

## Property Details

### The `“raw”` property

      “raw”                      gboolean

Whether to read compressed data with no header and no trailer.

Owner: GsfInputGZip

Flags: Read / Write / Construct Only

Default value: FALSE

### The `“source”` property

      “source”                   GsfInput *

Where the compressed data comes from.

Owner: GsfInputGZip

Flags: Read / Write / Construct Only

### The `“uncompressed-size”` property

      “uncompressed-size”        gint64

The source's uncompressed size.

Owner: GsfInputGZip

Flags: Read / Write / Construct Only

Allowed values: >= -1

Default value: -1

### The `“deflate-level”` property

      “deflate-level”            gint

The level of deflate compression used, zero meaning none and -1 meaning the zlib default.

Owner: GsfOutputGZip

Flags: Read / Write

Allowed values: [-1,9]

Default value: -1

### The `“raw”` property

      “raw”                      gboolean

Whether to write compressed data with no header/tailer.

Owner: GsfOutputGZip

Flags: Read / Write / Construct Only

Default value: FALSE

### The `“sink”` property

      “sink”                     GsfOutput *

Where the compressed data is written.

Owner: GsfOutputGZip

Flags: Read / Write / Construct Only