BZ2 - Compressed File Format

Last modified by Farooq Sheikh on 2019/10/11 06:07

BZ2 are compressed files generated using the BZIP2 open source compression method, mostly on UNIX or Linux system. It is used for compression of a single file and is not meant for archiving of multiple files. This is in contrast to the TAR file format on the same platforms that archives multiple files into a single file but without compression. Files compressed as BZ2 can be decompressed with applications like WinZip. BZIP2 uses Run-Length Encoding (RLE) or Burrows-Wheeler compression algorithm to achieve high levels of compression.

BZ2 File Format

There are no formal specifications available for this file format. However, an unofficial reverse engineered specifications show that a .bz2 stream consists of a 4-byte header which is followed by zero or more compressed blocks. It is immediately followed by an end-of-stream marker containing a 32-bit CRC for the plain text whole stream processed. There is no padding between the compressed blocks and all the blocks are bit-aligned.


Created by Kashif Iqbal on 2019/09/10 02:58