GZIP

Synopsis

HELP:   Compress data compliant to RCF1952 (GZIP)
TYPE:   OBJECT
SYNTAX: GZIP(LEVEL=num/COPY/FAST/LEV1/LEV2/LEV3/LEV4/LEV5/LEV6/LEV7/LEV8/LEV9/BEST/AUTO,MEMBER='str',COMMENT='str',CHECK)

Description

The GZIP compression conforms to RCF1951/52. The compression level can be set to values from 0 to 9 (0=copy, 1=fastest, 9=best). Additionally, it is possible to set a comment and to enforce checksum calculation of the file header.

The checksum calculation is not recommended because only the newer versions of Zlib can handle this checksum technique. With older versions of Zlib this can cause problems. Therefore, checksum calculation is turned off by default.

The decompressor also accepts the older Zlib wrapping format specified in RFC1950. It is not possible to enforce RFC1950 at compression because most standards require RFC1952 for the deflate algorithms.

If no compression level is defined and the data is marked is being without redundancy, level 0 (copy) is used. In all other cases the default level 6 is used.

Decompression of concatenated GZIP files is also possible. All concatenated files are decompressed into one file. It is also possible to decompress one specific member of this concatenation by specifying the member index of the file to be decompressed:

 filename/:memberindex

If GZIP compression is used with write.record(), all file attributes are stored in the GZIP header. The record attributes can be added in front of the record (PRNCTR=RETAIN). By default, a 4 byte length field in little endian is written in front of the data. Such a GZIP file can be used on record-oriented platforms to recreate datasets.

Arguments