cannam@89: cannam@89: This is the README for bzip2/libzip2. cannam@89: This version is fully compatible with the previous public releases. cannam@89: cannam@89: ------------------------------------------------------------------ cannam@89: This file is part of bzip2/libbzip2, a program and library for cannam@89: lossless, block-sorting data compression. cannam@89: cannam@89: bzip2/libbzip2 version 1.0.6 of 6 September 2010 cannam@89: Copyright (C) 1996-2010 Julian Seward cannam@89: cannam@89: Please read the WARNING, DISCLAIMER and PATENTS sections in this file. cannam@89: cannam@89: This program is released under the terms of the license contained cannam@89: in the file LICENSE. cannam@89: ------------------------------------------------------------------ cannam@89: cannam@89: Complete documentation is available in Postscript form (manual.ps), cannam@89: PDF (manual.pdf) or html (manual.html). A plain-text version of the cannam@89: manual page is available as bzip2.txt. cannam@89: cannam@89: cannam@89: HOW TO BUILD -- UNIX cannam@89: cannam@89: Type 'make'. This builds the library libbz2.a and then the programs cannam@89: bzip2 and bzip2recover. Six self-tests are run. If the self-tests cannam@89: complete ok, carry on to installation: cannam@89: cannam@89: To install in /usr/local/bin, /usr/local/lib, /usr/local/man and cannam@89: /usr/local/include, type cannam@89: cannam@89: make install cannam@89: cannam@89: To install somewhere else, eg, /xxx/yyy/{bin,lib,man,include}, type cannam@89: cannam@89: make install PREFIX=/xxx/yyy cannam@89: cannam@89: If you are (justifiably) paranoid and want to see what 'make install' cannam@89: is going to do, you can first do cannam@89: cannam@89: make -n install or cannam@89: make -n install PREFIX=/xxx/yyy respectively. cannam@89: cannam@89: The -n instructs make to show the commands it would execute, but not cannam@89: actually execute them. cannam@89: cannam@89: cannam@89: HOW TO BUILD -- UNIX, shared library libbz2.so. cannam@89: cannam@89: Do 'make -f Makefile-libbz2_so'. This Makefile seems to work for cannam@89: Linux-ELF (RedHat 7.2 on an x86 box), with gcc. I make no claims cannam@89: that it works for any other platform, though I suspect it probably cannam@89: will work for most platforms employing both ELF and gcc. cannam@89: cannam@89: bzip2-shared, a client of the shared library, is also built, but not cannam@89: self-tested. So I suggest you also build using the normal Makefile, cannam@89: since that conducts a self-test. A second reason to prefer the cannam@89: version statically linked to the library is that, on x86 platforms, cannam@89: building shared objects makes a valuable register (%ebx) unavailable cannam@89: to gcc, resulting in a slowdown of 10%-20%, at least for bzip2. cannam@89: cannam@89: Important note for people upgrading .so's from 0.9.0/0.9.5 to version cannam@89: 1.0.X. All the functions in the library have been renamed, from (eg) cannam@89: bzCompress to BZ2_bzCompress, to avoid namespace pollution. cannam@89: Unfortunately this means that the libbz2.so created by cannam@89: Makefile-libbz2_so will not work with any program which used an older cannam@89: version of the library. I do encourage library clients to make the cannam@89: effort to upgrade to use version 1.0, since it is both faster and more cannam@89: robust than previous versions. cannam@89: cannam@89: cannam@89: HOW TO BUILD -- Windows 95, NT, DOS, Mac, etc. cannam@89: cannam@89: It's difficult for me to support compilation on all these platforms. cannam@89: My approach is to collect binaries for these platforms, and put them cannam@89: on the master web site (http://www.bzip.org). Look there. However cannam@89: (FWIW), bzip2-1.0.X is very standard ANSI C and should compile cannam@89: unmodified with MS Visual C. If you have difficulties building, you cannam@89: might want to read README.COMPILATION.PROBLEMS. cannam@89: cannam@89: At least using MS Visual C++ 6, you can build from the unmodified cannam@89: sources by issuing, in a command shell: cannam@89: cannam@89: nmake -f makefile.msc cannam@89: cannam@89: (you may need to first run the MSVC-provided script VCVARS32.BAT cannam@89: so as to set up paths to the MSVC tools correctly). cannam@89: cannam@89: cannam@89: VALIDATION cannam@89: cannam@89: Correct operation, in the sense that a compressed file can always be cannam@89: decompressed to reproduce the original, is obviously of paramount cannam@89: importance. To validate bzip2, I used a modified version of Mark cannam@89: Nelson's churn program. Churn is an automated test driver which cannam@89: recursively traverses a directory structure, using bzip2 to compress cannam@89: and then decompress each file it encounters, and checking that the cannam@89: decompressed data is the same as the original. cannam@89: cannam@89: cannam@89: cannam@89: Please read and be aware of the following: cannam@89: cannam@89: WARNING: cannam@89: cannam@89: This program and library (attempts to) compress data by cannam@89: performing several non-trivial transformations on it. cannam@89: Unless you are 100% familiar with *all* the algorithms cannam@89: contained herein, and with the consequences of modifying them, cannam@89: you should NOT meddle with the compression or decompression cannam@89: machinery. Incorrect changes can and very likely *will* cannam@89: lead to disastrous loss of data. cannam@89: cannam@89: cannam@89: DISCLAIMER: cannam@89: cannam@89: I TAKE NO RESPONSIBILITY FOR ANY LOSS OF DATA ARISING FROM THE cannam@89: USE OF THIS PROGRAM/LIBRARY, HOWSOEVER CAUSED. cannam@89: cannam@89: Every compression of a file implies an assumption that the cannam@89: compressed file can be decompressed to reproduce the original. cannam@89: Great efforts in design, coding and testing have been made to cannam@89: ensure that this program works correctly. However, the complexity cannam@89: of the algorithms, and, in particular, the presence of various cannam@89: special cases in the code which occur with very low but non-zero cannam@89: probability make it impossible to rule out the possibility of bugs cannam@89: remaining in the program. DO NOT COMPRESS ANY DATA WITH THIS cannam@89: PROGRAM UNLESS YOU ARE PREPARED TO ACCEPT THE POSSIBILITY, HOWEVER cannam@89: SMALL, THAT THE DATA WILL NOT BE RECOVERABLE. cannam@89: cannam@89: That is not to say this program is inherently unreliable. cannam@89: Indeed, I very much hope the opposite is true. bzip2/libbzip2 cannam@89: has been carefully constructed and extensively tested. cannam@89: cannam@89: cannam@89: PATENTS: cannam@89: cannam@89: To the best of my knowledge, bzip2/libbzip2 does not use any cannam@89: patented algorithms. However, I do not have the resources cannam@89: to carry out a patent search. Therefore I cannot give any cannam@89: guarantee of the above statement. cannam@89: cannam@89: cannam@89: cannam@89: WHAT'S NEW IN 0.9.0 (as compared to 0.1pl2) ? cannam@89: cannam@89: * Approx 10% faster compression, 30% faster decompression cannam@89: * -t (test mode) is a lot quicker cannam@89: * Can decompress concatenated compressed files cannam@89: * Programming interface, so programs can directly read/write .bz2 files cannam@89: * Less restrictive (BSD-style) licensing cannam@89: * Flag handling more compatible with GNU gzip cannam@89: * Much more documentation, i.e., a proper user manual cannam@89: * Hopefully, improved portability (at least of the library) cannam@89: cannam@89: WHAT'S NEW IN 0.9.5 ? cannam@89: cannam@89: * Compression speed is much less sensitive to the input cannam@89: data than in previous versions. Specifically, the very cannam@89: slow performance caused by repetitive data is fixed. cannam@89: * Many small improvements in file and flag handling. cannam@89: * A Y2K statement. cannam@89: cannam@89: WHAT'S NEW IN 1.0.0 ? cannam@89: cannam@89: See the CHANGES file. cannam@89: cannam@89: WHAT'S NEW IN 1.0.2 ? cannam@89: cannam@89: See the CHANGES file. cannam@89: cannam@89: WHAT'S NEW IN 1.0.3 ? cannam@89: cannam@89: See the CHANGES file. cannam@89: cannam@89: WHAT'S NEW IN 1.0.4 ? cannam@89: cannam@89: See the CHANGES file. cannam@89: cannam@89: WHAT'S NEW IN 1.0.5 ? cannam@89: cannam@89: See the CHANGES file. cannam@89: cannam@89: WHAT'S NEW IN 1.0.6 ? cannam@89: cannam@89: See the CHANGES file. cannam@89: cannam@89: cannam@89: I hope you find bzip2 useful. Feel free to contact me at cannam@89: jseward@bzip.org cannam@89: if you have any suggestions or queries. Many people mailed me with cannam@89: comments, suggestions and patches after the releases of bzip-0.15, cannam@89: bzip-0.21, and bzip2 versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, cannam@89: 1.0.2 and 1.0.3, and the changes in bzip2 are largely a result of this cannam@89: feedback. I thank you for your comments. cannam@89: cannam@89: bzip2's "home" is http://www.bzip.org/ cannam@89: cannam@89: Julian Seward cannam@89: jseward@bzip.org cannam@89: Cambridge, UK. cannam@89: cannam@89: 18 July 1996 (version 0.15) cannam@89: 25 August 1996 (version 0.21) cannam@89: 7 August 1997 (bzip2, version 0.1) cannam@89: 29 August 1997 (bzip2, version 0.1pl2) cannam@89: 23 August 1998 (bzip2, version 0.9.0) cannam@89: 8 June 1999 (bzip2, version 0.9.5) cannam@89: 4 Sept 1999 (bzip2, version 0.9.5d) cannam@89: 5 May 2000 (bzip2, version 1.0pre8) cannam@89: 30 December 2001 (bzip2, version 1.0.2pre1) cannam@89: 15 February 2005 (bzip2, version 1.0.3) cannam@89: 20 December 2006 (bzip2, version 1.0.4) cannam@89: 10 December 2007 (bzip2, version 1.0.5) cannam@89: 6 Sept 2010 (bzip2, version 1.0.6)