External: index
Internal: |- preamble -|- downloads -|- end -|


This is just a WIN32 (XP) build of the source available at I tried and had no success, in a MSVC command prompt, with the makefile.msc build file supplied with the source, but as the library source, and the bzip2, and recover executable source list is short and sweet, had no problem building MSVC6 dsw/dsp build files to handle it.

I downloaded the 782,025 byte bzip2-1.0.6.tar.gz, and decompressed it using WinZip, into the folder C:\Project\bzip2\bzip-1.0.6, then created a 'build' folder for the MSVC build files, which puts the library, libbzip2,lib and libbzip2D.lib in 'build\lib', and the executable bzip2w32.exe and bzip2recoverw32.exe, and their 'D' counterparts, in the 'build\bin' folder. Added test.bat using the tests described in makefile.msc, and the standard window 'comp' file utility, and the EXE passed without problems.

The ONLY changes made to the source was to drop in some _MSC_VER pragma to disable warning 4996 -

#ifdef _MSC_VER
#pragma warning ( disable : 4996 ) // this function may be unsafe, etc, etc...

This was in the bzip2.c, bzip2recover.c, and bzlib_private.h sources, just to stop some compiler noise.

As is my habit, the MSVC build files ONLY build the STATIC version of libbzip2.lib, and the Microsoft RUNTIME used is also the 'static' version, namely /MT and /MTd. Also this is presently ONLY for the 32-bit build. Considerable modification would be needed to also build say bzip2lib.DLL, use the runtime DLL, /MD and /MDd, and/or build a 64-bit version.

While this software comes with its own BSD-style license - see the LICENSE file in the source - it appears somewhat compatible with GNU GPL, in that it may be used anywhere, including in commercial products, provided the full source is included, together with the license text.



Some downloads: TAKE CARE running EXECUTABLES from the web. This contains the MSVC6 build files, to build the project with any version of MSVC Just the executable, if you just want to try it. Static library, Release and Debug, to link with other projects. The source, better downloaded from

Date Link Size MD5
2012/02/20 10,281 3444beb701d4cc60896706ee6210ffd5
2012/02/20 77,376 21aa3d3b1bd8f5f3dcb3821dfda94087
2012/02/20 111,256 40e4005b7e6956e4b6b56f1108478378
2012/02/20 806,979 c02d0615bf9ad2037cbc5161c85dfbcc

 As suggested above it is usually better to download the LATEST source from, in which case you may want to consider patching it with the following - diff-01-patch.txt - but it is only to keep the compiler from spitting out quite a number of warnings.


Have FUN ;=))

EOP 2012-02-20

checked by Tidy  Valid HTML 4.01 Transitional