HELP: ZSTD data compression technique TYPE: OBJECT SYNTAX: ZSTD(LEVEL=num/FAST/LEV1/LEV2/LEV3/LEV4/LEV5/LEV6/LEV7/LEV8/LEV9/LEV10/LEV11/LEV12/LEV13/LEV14/LEV15/LEV16/LEV17/LEV18/LEV19/LEV20/LEV21/LEV22/BEST/AUTO,SKIP)
The ZSTD compression conforms to the ZSTD-compression tool on UNIX-systems. The compression level can be set to values from 1 to 22, where FAST (1) gives the fastest compression, AUTO (9) provides a balanced default and BEST (19) the maximum compression ratio that is still cheap to read.
AUTO (level 9) is used when no level is specified. If the data is marked as being without redundancy, FAST (level 1) is used instead.
BEST is level 19 and deliberately not the maximum level of the library. Measured with zstd 1.5.7 on text, on a payment-like CSV, on a column of two-byte length fields and on packed numbers, the levels 20, 21 and 22 compress exactly as well as level 19, but the window grows from 8 MiB to 128 MiB. The compressor then needs roughly 705 MiB instead of 81 MiB, and the decompressor - here and at the receiver - needs 128 MiB instead of 8 MiB. The higher levels remain available as LEV20, LEV21 and LEV22 for data that behaves differently.
Decompression of concatenated ZSTD 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 ZSTD compression is used with write.record(), the file attributes cannot be stored in the ZSTD 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 ZSTD 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.
NUMBER: LEVEL=num/FAST/LEV1/LEV2/LEV3/LEV4/LEV5/LEV6/LEV7/LEV8/LEV9/LEV10/LEV11/LEV12/LEV13/LEV14/LEV15/LEV16/LEV17/LEV18/LEV19/LEV20/LEV21/LEV22/BEST/AUTO - Compression level [AUTO==9]
FAST - Fastest compression (level 1)LEV1 - Compression level 1LEV2 - Compression level 2LEV3 - Compression level 3LEV4 - Compression level 4LEV5 - Compression level 5LEV6 - Compression level 6LEV7 - Compression level 7LEV8 - Compression level 8LEV9 - Compression level 9LEV10 - Compression level 10LEV11 - Compression level 11LEV12 - Compression level 12LEV13 - Compression level 13LEV14 - Compression level 14LEV15 - Compression level 15LEV16 - Compression level 16LEV17 - Compression level 17LEV18 - Compression level 18LEV19 - Compression level 19LEV20 - Compression level 20LEV21 - Compression level 21LEV22 - Compression level 22BEST - Best compression (level 19 (only 8 MiB))AUTO - Automatic compression (level 9)SWITCH: SKIP - Skip compression if no redundancy found [FALSE]