README 7.3 KB

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