Bzip2

bzip2 is a data compression algorithm and compressed file format.

Identification
Files begin with magic number "BZ" (bytes 42 5A). Then either an "h" (0x68; Huffman coding) or "0" (0x30; deprecated original version), then the block size, in 100kb units (TODO: clarify this).

Each compressed block starts with a magic number 0x314159265359 (yes, that is the start of decimal π, but in hex.)

The end of file marker uses magic number 0x177245385090 (square root of π, in the same ... interesting ... format.)

Software

 * bzip2 and libbzip2
 * 7-Zip

Sample files

 * https://telparia.com/fileFormatSamples/archive/bz2/sm.tar.bz2

Links

 * Wikipedia article
 * Chart of format details
 * bzip.org changes hands (LWN article from August 9, 2018)
 * ForensicsWiki entry (also includes more details on the headers)