BZ2

Synopsis

HELP:   Read BZIP2 compressed data
TYPE:   OBJECT
SYNTAX: BZ2(MEMBER='str',BUFSIZ=num,SMLSPC,SKPORG)

Description

The BZIP2 converter can be used to compress or decompress data streams compatible with the BZIP2 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. Record boundaries are lost. 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.

If no compression level is defined, the level used depends on the block size. A block size larger than 900KB results in the best compression level 9, greater than 800KiB and smaller than 900KiB in level 8, and so on. For blocks smaller than 100KB level 1 is used.

Decompression of concatenated BZIP2 files is also possible. All concatenated files will be 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.bz/#3
   test.bz/:2

BZIP2 data is written to ZIP archives as compression mode 12. The BZIP2 header and trailer are replaced by a ZIP local file header. If a BZIP2 file (compression mode 12) is read from a ZIP archive, it is converted to a BZIP2 data stream and can be decompressed with this component.

Arguments