I had to do this when I downloaded the PHP manual and it was compressed as bzip2. I wanted to uncompress in the Terminal so that the long file names would be retained -- sometimes uncompressing using Stuffit Expander clips the long file names.
Anyway, if you need to install bzip2 so you can uncompress on MacOSX's Terminal, read the rest of the article for the instructions...
First get the bzip source code.
To compile on MacOSX (assuming you've installed Developer CD):
- Copy the bzip2-1.0.2.tar.gz file to /usr/local and uncompress:
gzip -dc bzip2-1.0.2.tar.gz | tar xvf -
- Modify the Makefile and change "CC=gcc"
to "CC=cc"
- Do a make: /usr/local/bzip2-1.0.2/make
- Do a make install: /usr/local/bzip2-1.0.2/make install; this installs bzip2 into /usr/bin
- delete the directory created as well as the zip file:
% cd ..
% rm -f -r bzip2-1.0.2.tar.gz
% rm -f -r bzip2-1.0.2
bunzip2 php_manual_en.tar.bz2To get help of how to use bzip:
/usr/bin/bzip2 --help[Editor's note: If you have fink installed, you can install bzip2 with a simple sudo fink install bzip2.]

