The extension .bz is a source of confusion. In practice, almost every .bz file you meet today contains ordinary bzip2 data, only with a shorter extension. Some older tools and scripts, and systems limited to three-letter extensions, named their output this way; the archive variant is .tbz or .tar.bz. Very rarely you may come across a genuine file from bzip, the predecessor of bzip2, which is a different format.
bzip and bzip2: two formats
Julian Seward released bzip in the mid-1990s; version 0.21 from 1996 was the last. It combined the Burrows–Wheeler transform with arithmetic coding, which compressed well, but arithmetic coding was then covered by patents. Seward therefore rewrote the program as bzip2 with Huffman coding and deliberately did not keep compatibility. bzip2 1.0 does not read bzip-0.21 files, and bzip itself is no longer distributed. Decompress-only ports of the old code (bunzip 0.21) survive in some software collections for exactly this reason.
How to find out what you have
On Linux or macOS run file name.bz. If it says "bzip2 compressed data", it is bzip2 and everything on the BZ2 page applies. bzip2 files always start with the bytes BZh, so you can also check the first three characters in a text or hex viewer. Anything else, especially from archives of the 1990s, may be the old bzip format.
Opening .bz files
- Linux and macOS:
bunzip2 file.bz. bzip2 knows the .bz extension and simply removes it;.tbzbecomes.tar. For archives usetar -xf file.tbz. - Windows: 7-Zip opens bzip2 data regardless of the extension. If a program refuses the file, rename it to
.bz2. - Original bzip 0.21: only the old bunzip decompressor; standard tools report an error.
Like bz2, the format stores no file name. The name of the result is the .bz name without the extension, so if the inner extension is missing, add it by hand.
Converting BZ
Our converter treats .bz as bzip2: it decompresses the file (up to 2 GB unpacked, uploads up to 100 MB), unpacks a TAR inside if there is one, and packs the content into the format you choose, typically ZIP for Windows users, or gz, xz or bz2 when another tool expects that extension. A single plain file ends up named data in a ZIP or 7z, because the original name is not stored; rename it after extracting. Genuine files from the old bzip 0.21 cannot be converted. If you convert to BZ, the result is standard bzip2 data with the .bz extension; for several files we wrap them in a TAR first.
| BZ in brief | |
|---|---|
| Usual content | bzip2 data (same as .bz2) |
| Historical meaning | bzip 0.21 by Julian Seward, 1996, incompatible with bzip2 |
| Type | compression of a single file |
| Archive variant | .tbz, .tar.bz |
| Signature of bzip2 data | BZh |
More: bzip2 and its relation to bzip (Library of Congress), bzip2 project page.