1 |
This is the README for bzip2/libzip2. |
2 |
This version is fully compatible with the previous public releases. |
3 |
|
4 |
------------------------------------------------------------------ |
5 |
This file is part of bzip2/libbzip2, a program and library for |
6 |
lossless, block-sorting data compression. |
7 |
|
8 |
bzip2/libbzip2 version 1.0.4 of 20 December 2006 |
9 |
Copyright (C) 1996-2006 Julian Seward <jseward@bzip.org> |
10 |
|
11 |
Please read the WARNING, DISCLAIMER and PATENTS sections in this file. |
12 |
|
13 |
This program is released under the terms of the license contained |
14 |
in the file LICENSE. |
15 |
------------------------------------------------------------------ |
16 |
|
17 |
Complete documentation is available in Postscript form (manual.ps), |
18 |
PDF (manual.pdf) or html (manual.html). A plain-text version of the |
19 |
manual page is available as bzip2.txt. |
20 |
|
21 |
|
22 |
HOW TO BUILD -- UNIX |
23 |
|
24 |
Type 'make'. This builds the library libbz2.a and then the programs |
25 |
bzip2 and bzip2recover. Six self-tests are run. If the self-tests |
26 |
complete ok, carry on to installation: |
27 |
|
28 |
To install in /usr/local/bin, /usr/local/lib, /usr/local/man and |
29 |
/usr/local/include, type |
30 |
|
31 |
make install |
32 |
|
33 |
To install somewhere else, eg, /xxx/yyy/{bin,lib,man,include}, type |
34 |
|
35 |
make install PREFIX=/xxx/yyy |
36 |
|
37 |
If you are (justifiably) paranoid and want to see what 'make install' |
38 |
is going to do, you can first do |
39 |
|
40 |
make -n install or |
41 |
make -n install PREFIX=/xxx/yyy respectively. |
42 |
|
43 |
The -n instructs make to show the commands it would execute, but not |
44 |
actually execute them. |
45 |
|
46 |
|
47 |
HOW TO BUILD -- UNIX, shared library libbz2.so. |
48 |
|
49 |
Do 'make -f Makefile-libbz2_so'. This Makefile seems to work for |
50 |
Linux-ELF (RedHat 7.2 on an x86 box), with gcc. I make no claims |
51 |
that it works for any other platform, though I suspect it probably |
52 |
will work for most platforms employing both ELF and gcc. |
53 |
|
54 |
bzip2-shared, a client of the shared library, is also built, but not |
55 |
self-tested. So I suggest you also build using the normal Makefile, |
56 |
since that conducts a self-test. A second reason to prefer the |
57 |
version statically linked to the library is that, on x86 platforms, |
58 |
building shared objects makes a valuable register (%ebx) unavailable |
59 |
to gcc, resulting in a slowdown of 10%-20%, at least for bzip2. |
60 |
|
61 |
Important note for people upgrading .so's from 0.9.0/0.9.5 to version |
62 |
1.0.X. All the functions in the library have been renamed, from (eg) |
63 |
bzCompress to BZ2_bzCompress, to avoid namespace pollution. |
64 |
Unfortunately this means that the libbz2.so created by |
65 |
Makefile-libbz2_so will not work with any program which used an older |
66 |
version of the library. I do encourage library clients to make the |
67 |
effort to upgrade to use version 1.0, since it is both faster and more |
68 |
robust than previous versions. |
69 |
|
70 |
|
71 |
HOW TO BUILD -- Windows 95, NT, DOS, Mac, etc. |
72 |
|
73 |
It's difficult for me to support compilation on all these platforms. |
74 |
My approach is to collect binaries for these platforms, and put them |
75 |
on the master web site (http://www.bzip.org). Look there. However |
76 |
(FWIW), bzip2-1.0.X is very standard ANSI C and should compile |
77 |
unmodified with MS Visual C. If you have difficulties building, you |
78 |
might want to read README.COMPILATION.PROBLEMS. |
79 |
|
80 |
At least using MS Visual C++ 6, you can build from the unmodified |
81 |
sources by issuing, in a command shell: |
82 |
|
83 |
nmake -f makefile.msc |
84 |
|
85 |
(you may need to first run the MSVC-provided script VCVARS32.BAT |
86 |
so as to set up paths to the MSVC tools correctly). |
87 |
|
88 |
|
89 |
VALIDATION |
90 |
|
91 |
Correct operation, in the sense that a compressed file can always be |
92 |
decompressed to reproduce the original, is obviously of paramount |
93 |
importance. To validate bzip2, I used a modified version of Mark |
94 |
Nelson's churn program. Churn is an automated test driver which |
95 |
recursively traverses a directory structure, using bzip2 to compress |
96 |
and then decompress each file it encounters, and checking that the |
97 |
decompressed data is the same as the original. |
98 |
|
99 |
|
100 |
|
101 |
Please read and be aware of the following: |
102 |
|
103 |
WARNING: |
104 |
|
105 |
This program and library (attempts to) compress data by |
106 |
performing several non-trivial transformations on it. |
107 |
Unless you are 100% familiar with *all* the algorithms |
108 |
contained herein, and with the consequences of modifying them, |
109 |
you should NOT meddle with the compression or decompression |
110 |
machinery. Incorrect changes can and very likely *will* |
111 |
lead to disastrous loss of data. |
112 |
|
113 |
|
114 |
DISCLAIMER: |
115 |
|
116 |
I TAKE NO RESPONSIBILITY FOR ANY LOSS OF DATA ARISING FROM THE |
117 |
USE OF THIS PROGRAM/LIBRARY, HOWSOEVER CAUSED. |
118 |
|
119 |
Every compression of a file implies an assumption that the |
120 |
compressed file can be decompressed to reproduce the original. |
121 |
Great efforts in design, coding and testing have been made to |
122 |
ensure that this program works correctly. However, the complexity |
123 |
of the algorithms, and, in particular, the presence of various |
124 |
special cases in the code which occur with very low but non-zero |
125 |
probability make it impossible to rule out the possibility of bugs |
126 |
remaining in the program. DO NOT COMPRESS ANY DATA WITH THIS |
127 |
PROGRAM UNLESS YOU ARE PREPARED TO ACCEPT THE POSSIBILITY, HOWEVER |
128 |
SMALL, THAT THE DATA WILL NOT BE RECOVERABLE. |
129 |
|
130 |
That is not to say this program is inherently unreliable. |
131 |
Indeed, I very much hope the opposite is true. bzip2/libbzip2 |
132 |
has been carefully constructed and extensively tested. |
133 |
|
134 |
|
135 |
PATENTS: |
136 |
|
137 |
To the best of my knowledge, bzip2/libbzip2 does not use any |
138 |
patented algorithms. However, I do not have the resources |
139 |
to carry out a patent search. Therefore I cannot give any |
140 |
guarantee of the above statement. |
141 |
|
142 |
|
143 |
|
144 |
WHAT'S NEW IN 0.9.0 (as compared to 0.1pl2) ? |
145 |
|
146 |
* Approx 10% faster compression, 30% faster decompression |
147 |
* -t (test mode) is a lot quicker |
148 |
* Can decompress concatenated compressed files |
149 |
* Programming interface, so programs can directly read/write .bz2 files |
150 |
* Less restrictive (BSD-style) licensing |
151 |
* Flag handling more compatible with GNU gzip |
152 |
* Much more documentation, i.e., a proper user manual |
153 |
* Hopefully, improved portability (at least of the library) |
154 |
|
155 |
WHAT'S NEW IN 0.9.5 ? |
156 |
|
157 |
* Compression speed is much less sensitive to the input |
158 |
data than in previous versions. Specifically, the very |
159 |
slow performance caused by repetitive data is fixed. |
160 |
* Many small improvements in file and flag handling. |
161 |
* A Y2K statement. |
162 |
|
163 |
WHAT'S NEW IN 1.0.0 ? |
164 |
|
165 |
See the CHANGES file. |
166 |
|
167 |
WHAT'S NEW IN 1.0.2 ? |
168 |
|
169 |
See the CHANGES file. |
170 |
|
171 |
WHAT'S NEW IN 1.0.3 ? |
172 |
|
173 |
See the CHANGES file. |
174 |
|
175 |
WHAT'S NEW IN 1.0.4 ? |
176 |
|
177 |
See the CHANGES file. |
178 |
|
179 |
|
180 |
I hope you find bzip2 useful. Feel free to contact me at |
181 |
jseward@bzip.org |
182 |
if you have any suggestions or queries. Many people mailed me with |
183 |
comments, suggestions and patches after the releases of bzip-0.15, |
184 |
bzip-0.21, and bzip2 versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, |
185 |
1.0.2 and 1.0.3, and the changes in bzip2 are largely a result of this |
186 |
feedback. I thank you for your comments. |
187 |
|
188 |
bzip2's "home" is http://www.bzip.org/ |
189 |
|
190 |
Julian Seward |
191 |
jseward@bzip.org |
192 |
Cambridge, UK. |
193 |
|
194 |
18 July 1996 (version 0.15) |
195 |
25 August 1996 (version 0.21) |
196 |
7 August 1997 (bzip2, version 0.1) |
197 |
29 August 1997 (bzip2, version 0.1pl2) |
198 |
23 August 1998 (bzip2, version 0.9.0) |
199 |
8 June 1999 (bzip2, version 0.9.5) |
200 |
4 Sept 1999 (bzip2, version 0.9.5d) |
201 |
5 May 2000 (bzip2, version 1.0pre8) |
202 |
30 December 2001 (bzip2, version 1.0.2pre1) |
203 |
15 February 2005 (bzip2, version 1.0.3) |
204 |
20 December 2006 (bzip2, version 1.0.4) |