14f9a1459Swiz 24f9a1459SwizThis is the README for bzip2/libzip2. 34f9a1459SwizThis version is fully compatible with the previous public releases. 44f9a1459Swiz 54f9a1459Swiz------------------------------------------------------------------ 64f9a1459SwizThis file is part of bzip2/libbzip2, a program and library for 74f9a1459Swizlossless, block-sorting data compression. 84f9a1459Swiz 9*c12ab3f1Smayabzip2/libbzip2 version 1.0.8 of 13 July 2019 10*c12ab3f1SmayaCopyright (C) 1996-2019 Julian Seward <jseward@acm.org> 114f9a1459Swiz 124f9a1459SwizPlease read the WARNING, DISCLAIMER and PATENTS sections in this file. 134f9a1459Swiz 144f9a1459SwizThis program is released under the terms of the license contained 154f9a1459Swizin the file LICENSE. 164f9a1459Swiz------------------------------------------------------------------ 174f9a1459Swiz 184f9a1459SwizComplete documentation is available in Postscript form (manual.ps), 194f9a1459SwizPDF (manual.pdf) or html (manual.html). A plain-text version of the 204f9a1459Swizmanual page is available as bzip2.txt. 214f9a1459Swiz 224f9a1459Swiz 234f9a1459SwizHOW TO BUILD -- UNIX 244f9a1459Swiz 254f9a1459SwizType 'make'. This builds the library libbz2.a and then the programs 264f9a1459Swizbzip2 and bzip2recover. Six self-tests are run. If the self-tests 274f9a1459Swizcomplete ok, carry on to installation: 284f9a1459Swiz 294f9a1459SwizTo install in /usr/local/bin, /usr/local/lib, /usr/local/man and 304f9a1459Swiz/usr/local/include, type 314f9a1459Swiz 324f9a1459Swiz make install 334f9a1459Swiz 344f9a1459SwizTo install somewhere else, eg, /xxx/yyy/{bin,lib,man,include}, type 354f9a1459Swiz 364f9a1459Swiz make install PREFIX=/xxx/yyy 374f9a1459Swiz 384f9a1459SwizIf you are (justifiably) paranoid and want to see what 'make install' 394f9a1459Swizis going to do, you can first do 404f9a1459Swiz 414f9a1459Swiz make -n install or 424f9a1459Swiz make -n install PREFIX=/xxx/yyy respectively. 434f9a1459Swiz 444f9a1459SwizThe -n instructs make to show the commands it would execute, but not 454f9a1459Swizactually execute them. 464f9a1459Swiz 474f9a1459Swiz 484f9a1459SwizHOW TO BUILD -- UNIX, shared library libbz2.so. 494f9a1459Swiz 504f9a1459SwizDo 'make -f Makefile-libbz2_so'. This Makefile seems to work for 514f9a1459SwizLinux-ELF (RedHat 7.2 on an x86 box), with gcc. I make no claims 524f9a1459Swizthat it works for any other platform, though I suspect it probably 534f9a1459Swizwill work for most platforms employing both ELF and gcc. 544f9a1459Swiz 554f9a1459Swizbzip2-shared, a client of the shared library, is also built, but not 564f9a1459Swizself-tested. So I suggest you also build using the normal Makefile, 574f9a1459Swizsince that conducts a self-test. A second reason to prefer the 584f9a1459Swizversion statically linked to the library is that, on x86 platforms, 594f9a1459Swizbuilding shared objects makes a valuable register (%ebx) unavailable 604f9a1459Swizto gcc, resulting in a slowdown of 10%-20%, at least for bzip2. 614f9a1459Swiz 624f9a1459SwizImportant note for people upgrading .so's from 0.9.0/0.9.5 to version 634f9a1459Swiz1.0.X. All the functions in the library have been renamed, from (eg) 644f9a1459SwizbzCompress to BZ2_bzCompress, to avoid namespace pollution. 654f9a1459SwizUnfortunately this means that the libbz2.so created by 664f9a1459SwizMakefile-libbz2_so will not work with any program which used an older 674f9a1459Swizversion of the library. I do encourage library clients to make the 684f9a1459Swizeffort to upgrade to use version 1.0, since it is both faster and more 694f9a1459Swizrobust than previous versions. 704f9a1459Swiz 714f9a1459Swiz 724f9a1459SwizHOW TO BUILD -- Windows 95, NT, DOS, Mac, etc. 734f9a1459Swiz 744f9a1459SwizIt's difficult for me to support compilation on all these platforms. 754f9a1459SwizMy approach is to collect binaries for these platforms, and put them 76*c12ab3f1Smayaon the master web site (https://sourceware.org/bzip2/). Look there. However 774f9a1459Swiz(FWIW), bzip2-1.0.X is very standard ANSI C and should compile 784f9a1459Swizunmodified with MS Visual C. If you have difficulties building, you 794f9a1459Swizmight want to read README.COMPILATION.PROBLEMS. 804f9a1459Swiz 814f9a1459SwizAt least using MS Visual C++ 6, you can build from the unmodified 824f9a1459Swizsources by issuing, in a command shell: 834f9a1459Swiz 844f9a1459Swiz nmake -f makefile.msc 854f9a1459Swiz 864f9a1459Swiz(you may need to first run the MSVC-provided script VCVARS32.BAT 874f9a1459Swiz so as to set up paths to the MSVC tools correctly). 884f9a1459Swiz 894f9a1459Swiz 904f9a1459SwizVALIDATION 914f9a1459Swiz 924f9a1459SwizCorrect operation, in the sense that a compressed file can always be 934f9a1459Swizdecompressed to reproduce the original, is obviously of paramount 944f9a1459Swizimportance. To validate bzip2, I used a modified version of Mark 954f9a1459SwizNelson's churn program. Churn is an automated test driver which 964f9a1459Swizrecursively traverses a directory structure, using bzip2 to compress 974f9a1459Swizand then decompress each file it encounters, and checking that the 984f9a1459Swizdecompressed data is the same as the original. 994f9a1459Swiz 1004f9a1459Swiz 1014f9a1459Swiz 1024f9a1459SwizPlease read and be aware of the following: 1034f9a1459Swiz 1044f9a1459SwizWARNING: 1054f9a1459Swiz 1064f9a1459Swiz This program and library (attempts to) compress data by 1074f9a1459Swiz performing several non-trivial transformations on it. 1084f9a1459Swiz Unless you are 100% familiar with *all* the algorithms 1094f9a1459Swiz contained herein, and with the consequences of modifying them, 1104f9a1459Swiz you should NOT meddle with the compression or decompression 1114f9a1459Swiz machinery. Incorrect changes can and very likely *will* 1124f9a1459Swiz lead to disastrous loss of data. 1134f9a1459Swiz 1144f9a1459Swiz 1154f9a1459SwizDISCLAIMER: 1164f9a1459Swiz 1174f9a1459Swiz I TAKE NO RESPONSIBILITY FOR ANY LOSS OF DATA ARISING FROM THE 1184f9a1459Swiz USE OF THIS PROGRAM/LIBRARY, HOWSOEVER CAUSED. 1194f9a1459Swiz 1204f9a1459Swiz Every compression of a file implies an assumption that the 1214f9a1459Swiz compressed file can be decompressed to reproduce the original. 1224f9a1459Swiz Great efforts in design, coding and testing have been made to 1234f9a1459Swiz ensure that this program works correctly. However, the complexity 1244f9a1459Swiz of the algorithms, and, in particular, the presence of various 1254f9a1459Swiz special cases in the code which occur with very low but non-zero 1264f9a1459Swiz probability make it impossible to rule out the possibility of bugs 1274f9a1459Swiz remaining in the program. DO NOT COMPRESS ANY DATA WITH THIS 1284f9a1459Swiz PROGRAM UNLESS YOU ARE PREPARED TO ACCEPT THE POSSIBILITY, HOWEVER 1294f9a1459Swiz SMALL, THAT THE DATA WILL NOT BE RECOVERABLE. 1304f9a1459Swiz 1314f9a1459Swiz That is not to say this program is inherently unreliable. 1324f9a1459Swiz Indeed, I very much hope the opposite is true. bzip2/libbzip2 1334f9a1459Swiz has been carefully constructed and extensively tested. 1344f9a1459Swiz 1354f9a1459Swiz 1364f9a1459SwizPATENTS: 1374f9a1459Swiz 1384f9a1459Swiz To the best of my knowledge, bzip2/libbzip2 does not use any 1394f9a1459Swiz patented algorithms. However, I do not have the resources 1404f9a1459Swiz to carry out a patent search. Therefore I cannot give any 1414f9a1459Swiz guarantee of the above statement. 1424f9a1459Swiz 1434f9a1459Swiz 1444f9a1459Swiz 1454f9a1459SwizWHAT'S NEW IN 0.9.0 (as compared to 0.1pl2) ? 1464f9a1459Swiz 1474f9a1459Swiz * Approx 10% faster compression, 30% faster decompression 1484f9a1459Swiz * -t (test mode) is a lot quicker 1494f9a1459Swiz * Can decompress concatenated compressed files 1504f9a1459Swiz * Programming interface, so programs can directly read/write .bz2 files 1514f9a1459Swiz * Less restrictive (BSD-style) licensing 1524f9a1459Swiz * Flag handling more compatible with GNU gzip 1534f9a1459Swiz * Much more documentation, i.e., a proper user manual 1544f9a1459Swiz * Hopefully, improved portability (at least of the library) 1554f9a1459Swiz 1564f9a1459SwizWHAT'S NEW IN 0.9.5 ? 1574f9a1459Swiz 1584f9a1459Swiz * Compression speed is much less sensitive to the input 1594f9a1459Swiz data than in previous versions. Specifically, the very 1604f9a1459Swiz slow performance caused by repetitive data is fixed. 1614f9a1459Swiz * Many small improvements in file and flag handling. 1624f9a1459Swiz * A Y2K statement. 1634f9a1459Swiz 164*c12ab3f1SmayaWHAT'S NEW IN 1.0.x ? 1654f9a1459Swiz 1664f9a1459Swiz See the CHANGES file. 1674f9a1459Swiz 168*c12ab3f1SmayaI hope you find bzip2 useful. Feel free to contact the developers at 169*c12ab3f1Smaya bzip2-devel@sourceware.org 1704f9a1459Swizif you have any suggestions or queries. Many people mailed me with 1714f9a1459Swizcomments, suggestions and patches after the releases of bzip-0.15, 1724f9a1459Swizbzip-0.21, and bzip2 versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, 1734f9a1459Swiz1.0.2 and 1.0.3, and the changes in bzip2 are largely a result of this 1744f9a1459Swizfeedback. I thank you for your comments. 1754f9a1459Swiz 176*c12ab3f1Smayabzip2's "home" is https://sourceware.org/bzip2/ 1774f9a1459Swiz 1784f9a1459SwizJulian Seward 179*c12ab3f1Smayajseward@acm.org 1804f9a1459SwizCambridge, UK. 1814f9a1459Swiz 1824f9a1459Swiz18 July 1996 (version 0.15) 1834f9a1459Swiz25 August 1996 (version 0.21) 1844f9a1459Swiz 7 August 1997 (bzip2, version 0.1) 1854f9a1459Swiz29 August 1997 (bzip2, version 0.1pl2) 1864f9a1459Swiz23 August 1998 (bzip2, version 0.9.0) 1874f9a1459Swiz 8 June 1999 (bzip2, version 0.9.5) 1884f9a1459Swiz 4 Sept 1999 (bzip2, version 0.9.5d) 1894f9a1459Swiz 5 May 2000 (bzip2, version 1.0pre8) 1904f9a1459Swiz30 December 2001 (bzip2, version 1.0.2pre1) 1914f9a1459Swiz15 February 2005 (bzip2, version 1.0.3) 1924f9a1459Swiz20 December 2006 (bzip2, version 1.0.4) 1934f9a1459Swiz10 December 2007 (bzip2, version 1.0.5) 194f04bd531Swiz 6 Sept 2010 (bzip2, version 1.0.6) 195*c12ab3f1Smaya27 June 2019 (bzip2, version 1.0.7) 196*c12ab3f1Smaya13 July 2019 (bzip2, version 1.0.8) 197