HELP: Read LZ4 compressed data TYPE: OBJECT SYNTAX: LZ4(MEMBER='str',BUFSIZ=num,SKPORG)
The LZ4 converter can be used to compress or decompress data streams using the LZ4 block format with a custom frame header.
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.
There is no header to store meta information about the data, so all metadata is lost.
The compression level (CMPLEV) runs from 1 to 16, where a higher level gives better compression and a lower level gives more speed. LZ4 itself takes the opposite number, an acceleration, and the converter derives it as 17 minus the level. So FAST is level 1 (acceleration 16), AUTO is level 7 (acceleration 10) and BEST is level 16 (acceleration 1).
If no compression level is defined and the data is marked as being without redundancy, then the original data block is copied uncompressed. In all other cases level 7 (acceleration 10) is used.
Decompression of concatenated LZ4 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 filename/#memberindex test.lz4/#3 test.lz4/:2
LZ4 cannot be stored as a ZIP member. The PKWARE APPNOTE defines no compression method for LZ4, so ALGO= of the ZIP layer offers no LZ4 entry and the ZIP component rejects an LZ4 stream on writing as well as on reading. To carry LZ4 data inside a ZIP archive, compress it with CNV.LZ4() and store the resulting stream uncompressed (ALGO=COPY).
STRING: MEMBER='str' - Index of the member in the LZ4 file to readNUMBER: BUFSIZ=num - Initial buffer size for preallocation [65536]SWITCH: SKPORG - Skip decompression if original was copied [FALSE]