The bzip2 and libbzip2 official home page

The master version of this page lives at, and new stuff, mainly executables, will appear there first.

The current stable version of bzip2 is 1.0.2.

What is bzip2?

bzip2 is a freely available, patent free (see below), high-quality data compressor. It typically compresses files to within 10% to 15% of the best available techniques (the PPM family of statistical compressors), whilst being around twice as fast at compression and six times faster at decompression.

Why would I want to use it?

The code is organised as a library, with a programming interface. The bzip2 program itself is a client of the library. You can use the library in your own programs, to directly read and write .bz2 files, or even just to compress data in memory using the bzip2 algorithms.

Getting the latest version: bzip2-1.0.2

1.0.2 is a minor maintenance release which fixes some security holes and various minor problems in 1.0.0/1.0.1. See the CHANGES file in the sources for details. Upgrading to 1.0.2 is recommended.

Executables for 1.0.2

First off, here are some executables I've collected. I hope to expand this list over time. Because 1.0.2 is pretty new, this list is very small. If your system isn't listed, there may be an older version available: see the next section. As with previous releases, I will expand this list as people donate executables for other systems. Please read the notes on executables before downloading. You might avoid some common problems.


Here's the source code, including full documentation. For the paranoid, some MD5 sums:

ee76864958d568677f03db8afad92beb v102/bzip2-1.0.2.tar.gz
770135dc94369cb3eb6013ed505c8dc5 v100/bzip2-1.0.1.tar.gz
8a3f6d1d9e4072bb3c7aeae6578ae6ca v095/bzip2-0.9.5d.tar.gz
29993af5282e817fafc5a76b4e0c98fa v090/bzip2-0.9.0c.tar.gz
11fe7b9615eb84326712cb41671a7103 v01pl2/bzip2-0.1pl2.tar.gz

If you can be bothered, please email me to say you've got a copy. It's nice to know where this stuff gets to.


Here's the HTML version of the complete manual. And here's the postscript and PDF versions.

Many people have asked about Y2K issues in bzip2. Here's a short statement.

Contributed stuff

David Fetter maintains a bzip2-HOWTO document.

Some notes on executables:

Getting an older version

Here's a list of increasingly ancient executables for increasingly ancient platforms. Try these if you can't get a 1.0.2 executable for your platform, and you can't build 1.0.2 from source. Be hereby warned that newer versions are more secure, more featureful and faster, so it's much preferable to use the latest version (1.0.2). Please read the notes on executables before downloading. That said, here's the long list of executables for old platforms:

Version 1.0.0 (and 1.0.1; these are functionally identical)

The compression library underlying 1.0.0/1.0.1

There's increasing demand for the library as a DLL (Win32) or as Unix dynamic shared objects (.so's). Here are some. Linux users, you first need to find out which libc version you have, by doing 'ls /lib/*libc-*'.

Version 0.9.5d

Version 0.9.0b

If your machine isn't listed here, don't despair. bzip2 is very portable. It should run on practically any 32 or 64 bit computer, if you have enough spare memory (at least 8 megabytes). If you have an ANSI C compiler, you have a very good chance of building a working executable from the sources with minimal difficulty.

TO USE: Rename the file you've got to plain "bzip2" (or "bzip2.exe", on Win95/98/NT/2000), and use it. Unix folks will also need to set the permissions suitably ("chmod u+x bzip2").

To decompress a .bz2 file, do "bzip2 -d my_file.bz2". Remember, the one program does both compression and decompression. To get decompression by default, copy "bzip2.exe" to "bunzip2.exe" (Win95/98/NT/2000), or symlink "bzip2" to "bunzip2" (Unix users).

What's your day job?

I'm an (experimental) compiler-writer by trade. At the moment I work as a research assistant for Glasgow University, helping develop a compiler for the functional language Haskell. The Glasgow Haskell compiler serves as a testbed for research into Haskell, and at the same time is a stable, well regarded, freely available, state of the art optimising compiler for Haskell. It's available for most major platforms. Perhaps you'd care to give it a spin. It's open source. Naturally.

In the more distant past, I worked for five years on parallelising compilers for functional languages at the University of Manchester, UK. I'm a big fan of Haskell, an elegant and useful functional language. Getting a bit bored with C? Try doing some lazy functional programming in Haskell. It'll change the way you think about programming. Permanently.

I'm a member of the ACM, which I think is a fine organisation. You can reach me by email through ACM, or via a more direct route.

Other stuff I did: cacheprof

Memory effects have a big effect on the performance of programs -- especially bzip2. I tried and failed to find a decent, open-source tool which would tell me exactly which lines of code produce cache misses, and in the end I wrote my own. It's a useful performance analysis tool, and I think it totally Kicks Ass. Your opinion may differ. In any case, you can get it from

Julian Seward (

Last updated 26 January 2002.