## ZIP archives

ZIP archives — ZIP compression and archive format

## Synopsis

                GsfInfileZip;
    GsfInfile*  gsf_infile_zip_new              (GsfInput *source,
                                                 GError **err);
                GsfOutfileZip;
    GsfOutfile* gsf_outfile_zip_new             (GsfOutput *sink,
                                                 GError **err);
    gboolean    gsf_outfile_zip_set_compression_method
                                                (GsfOutfileZip *zip,
                                                 GsfZipCompressionMethod method);

## Object Hierarchy

      GObject
       +----GsfInput
             +----GsfInfile
                   +----GsfInfileZip

      GObject
       +----GsfOutput
             +----GsfOutfile
                   +----GsfOutfileZip

## Properties

      "compression-level"    gint                  : Read
      "internal-parent"      GsfInfileZip          : Write / Construct Only
      "source"               GsfInput              : Read / Write / Construct Only
      "compression-level"    gint                  : Read / Write / Construct Only
      "entry-name"           gchararray            : Read / Write / Construct Only
      "sink"                 GsfOutput             : Read / Write / Construct Only

## Description

The ZIP file format is a file format that provides data compression and archiving. It is in widespread use on various platforms.

These routines handle ZIP archives.

## Details

### GsfInfileZip

    typedef struct _GsfInfileZip GsfInfileZip;

### gsf_infile_zip_new ()

    GsfInfile*  gsf_infile_zip_new              (GsfInput *source,
                                                 GError **err);

Opens the root directory of a Zip file.

### Note

This adds a reference to `source`.

`source` : | A base GsfInput
`err` : | A GError, optionally `null`
Returns : | the new zip file handler

### GsfOutfileZip

    typedef struct _GsfOutfileZip GsfOutfileZip;

### gsf_outfile_zip_new ()

    GsfOutfile* gsf_outfile_zip_new             (GsfOutput *sink,
                                                 GError **err);

Creates the root directory of a Zip file and manages the addition of children.

### Note

This adds a reference to `sink`.

`sink` : |
`err` : |
Returns : | the new zip file handler

### gsf_outfile_zip_set_compression_method ()

    gboolean    gsf_outfile_zip_set_compression_method
                                                (GsfOutfileZip *zip,
                                                 GsfZipCompressionMethod method);

`zip` : |
`method` : |
Returns : |

## Property Details

### The "`compression-level`" property

      "compression-level"    gint                  : Read

The level of compression used, zero meaning none.

Allowed values: [0,10]

Default value: 0

### The "`internal-parent`" property

      "internal-parent"      GsfInfileZip          : Write / Construct Only

Internal use only.

### The "`source`" property

      "source"               GsfInput              : Read / Write / Construct Only

The archive being interpreted.

### The "`compression-level`" property

      "compression-level"    gint                  : Read / Write / Construct Only

The level of compression used, zero meaning none.

Allowed values: [0,10]

Default value: 8

### The "`entry-name`" property

      "entry-name"           gchararray            : Read / Write / Construct Only

The filename of this member in the archive without path.

Default value: NULL

### The "`sink`" property

      "sink"                 GsfOutput             : Read / Write / Construct Only

Where the archive is written.

## See Also

The Wikipedia article "ZIP (file format)".