#### ZIP

#### Synopsis

    HELP:   Read compressed data (GZIP, BZIP2, LZMA, ...)
    TYPE:   OBJECT
    SYNTAX: ZIP(MEMBER='str',BUFSIZ=num,SKPORG)

#### Description

The ZIP converter can read or write compressed data streams. It is meant to be used in combination with ZIP archives (FIO.ZIP()), otherwise the archived files are stored uncompressed. When reading, the compression algorithm is detected automatically. When writing, compression is skipped dynamically when no redundancies are found in the data and hence data reduction is not possible, resulting in the data being stored uncompressed. The supported compression algorithms are DEFLATE (default) and BZIP2. Note that many compression utilities do not support decompression of files not compressed with DEFLATE (ISO).

Internally, this component uses the dedicated compression components for CNV.GZP() and CNV.BZ2(). For details like compression levels, please refer to the documentation of these components.

When using this component together with FIO.ZIP() to decompress archive members and the ZIP file to be read contains files that are compressed with GZIP, BZIP2 or XZ, they are automatically decompressed. To prevent automatic decompression, the SKPORG switch must be activated.

If you use one of the dedicated compression components (CNV.GZP(), CNV.BZ2(), ...) instead of CNV.ZIP(), the resulting ZIP file contains uncompressed (from ZIP perspective) files that have been compressed with GZIP/BZIP2/... before they have been added to the ZIP file.

#### Example

       inp(sav.fil(fio.zip(name=my.zip member=test.txt) cnv.zip()))
       out(sav.fil(cnv.zip() fio.zip(name=my.zip)))

#### Arguments

- `STRING: MEMBER='str' - Index of the member in the compressed file to read`
- `NUMBER: BUFSIZ=num - Initial buffer size for preallocation[65536]`
- `SWITCH: SKPORG - Skip decompression if original was copied [FALSE]`