LZP

Synopsis

HELP:   Read LZIP/LZPP compressed data
TYPE:   OBJECT
SYNTAX: LZP(MEMBER='str',BUFSIZ=num,SKPORG)

Description

The LZIP converter can be used to compress or decompress data streams using the LZIP format, which is compatible with the lzip utility on UNIX systems.

The result of a compression is a binary block. The result of a decompression can be text, XML, a base encoding or binary data. Please use delimiters, length fields or fixed length data if records must be exchanged.

The LZIP container format stores an LZMA1-compressed bitstream with a fixed 6-byte header ("LZIP" magic, version, dictionary-size byte) and a 20-byte trailer (CRC32 of the uncompressed data, uncompressed size, and member size). This layout is identical to files produced by the lzip utility and is fully interoperable with it.

FL5 also supports the LZPP container variant. LZPP is an FL5- proprietary format that extends the LZIP header to store the full 5-byte LZMA1 property set, allowing dictionary sizes and LZMA parameters that are outside the fixed set permitted by LZIP. LZPP files are identified by the magic bytes "LZPP" and are used internally when reading LZMA-compressed entries from ZIP archives (method 14, PKWARE APPNOTE) that carry non-standard LZMA properties.

Compression writes LZIP format only and is therefore compatible with the lzip utility.

The compression level is specified as an LZMA preset level (CMPLEV). FAST, AUTO and BEST are aliases whose value depends on the word size of the platform: presets 0, 3 and 6 on 32-bit platforms (including z/OS AMODE 31), and presets 1, 6 and LEVX (preset 9 with LZMA_PRESET_EXTREME) on 64-bit platforms. The cap on 32 bit exists because the dictionary has to be provided again when READING: LEVX needs 64 MiB. State the preset numerically (LEV0 to LEV9, LEVX) if the result has to be the same on every platform.

If no compression level is defined and the data is marked as being without redundancy, then preset 0 is used. That is the cheapest setting, not a copy: liblzma has no store mode and preset 0 still compresses. In all other cases the AUTO preset is used.

Decompression of concatenated LZIP or LZPP files is also possible. All concatenated members are decompressed into one output stream. It is also possible to decompress one specific member of a concatenated file by specifying the member index:

   filename/:memberindex
   filename/#memberindex

   test.lz/#3
   test.lz/:2

LZIP data streams can be written to ZIP archives as compression method 14 (LZMA). The LZIP frame header is stripped and replaced by the ZIP LZMA header defined in the PKWARE APPNOTE. If a ZIP archive entry with compression method 14 is read, it is converted into a compatible LZMA stream that can be decompressed with this component.

Arguments