LZ4

Synopsis

HELP:   LZ4 data compression technique
TYPE:   OBJECT
SYNTAX: LZ4(LEVEL=num/FAST/LEV1/LEV2/LEV3/LEV4/LEV5/LEV6/LEV7/LEV8/LEV9/LEV10/LEV11/LEV12/LEV13/LEV14/LEV15/LEV16/BEST/AUTO,SKIP)

Description

The LZ4 compression uses the LZ4 block format with a custom frame header. LZ4 is designed for fast compression and decompression, trading compression ratio for speed.

The compression level runs from 1 to 16 and is turned into the LZ4 acceleration inside the component: acceleration = 17 - level. A low level is therefore a high acceleration - fast and weak - and a high level is a low acceleration:

LZ4 has no store mode; LEV1 is the cheapest setting.

By default, a 4-byte little-endian block size prefix is used in the LZ4 frame header, followed by compressed or uncompressed blocks and an end mark.

If LZ4 compression is used with write.record(), the file attributes cannot be stored in the LZ4 file. 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 an LZ4 file can be used on record-oriented platforms to recreate the original datasets as PS-VB. You may want to use a ZIP archive or ARMOR encoding to store the file attributes (DCB) to recreate the correct record format and length.

Arguments