aboutsummaryrefslogtreecommitdiff
path: root/manual.texi
diff options
context:
space:
mode:
Diffstat (limited to 'manual.texi')
-rw-r--r--manual.texi114
1 files changed, 71 insertions, 43 deletions
diff --git a/manual.texi b/manual.texi
index 336776a..5bc27d5 100644
--- a/manual.texi
+++ b/manual.texi
@@ -2,10 +2,10 @@
2@setfilename bzip2.info 2@setfilename bzip2.info
3 3
4@ignore 4@ignore
5This file documents bzip2 version 1.0, and associated library 5This file documents bzip2 version 1.0.2, and associated library
6libbzip2, written by Julian Seward (jseward@acm.org). 6libbzip2, written by Julian Seward (jseward@acm.org).
7 7
8Copyright (C) 1996-2000 Julian R Seward 8Copyright (C) 1996-2002 Julian R Seward
9 9
10Permission is granted to make and distribute verbatim copies of 10Permission is granted to make and distribute verbatim copies of
11this manual provided the copyright notice and this permission notice 11this manual provided the copyright notice and this permission notice
@@ -30,8 +30,8 @@ END-INFO-DIR-ENTRY
30@titlepage 30@titlepage
31@title bzip2 and libbzip2 31@title bzip2 and libbzip2
32@subtitle a program and library for data compression 32@subtitle a program and library for data compression
33@subtitle copyright (C) 1996-2000 Julian Seward 33@subtitle copyright (C) 1996-2002 Julian Seward
34@subtitle version 1.0 of 21 March 2000 34@subtitle version 1.0.2 of 30 December 2001
35@author Julian Seward 35@author Julian Seward
36 36
37@end titlepage 37@end titlepage
@@ -40,11 +40,17 @@ END-INFO-DIR-ENTRY
40@parskip 2mm 40@parskip 2mm
41 41
42@end iftex 42@end iftex
43@node Top, Overview, (dir), (dir) 43@node Top,,, (dir)
44
45The following text is the License for this software. You should
46find it identical to that contained in the file LICENSE in the
47source distribution.
48
49@bf{------------------ START OF THE LICENSE ------------------}
44 50
45This program, @code{bzip2}, 51This program, @code{bzip2},
46and associated library @code{libbzip2}, are 52and associated library @code{libbzip2}, are
47Copyright (C) 1996-2000 Julian R Seward. All rights reserved. 53Copyright (C) 1996-2002 Julian R Seward. All rights reserved.
48 54
49Redistribution and use in source and binary forms, with or without 55Redistribution and use in source and binary forms, with or without
50modification, are permitted provided that the following conditions 56modification, are permitted provided that the following conditions
@@ -82,13 +88,15 @@ Julian Seward, Cambridge, UK.
82 88
83@code{jseward@@acm.org} 89@code{jseward@@acm.org}
84 90
85@code{http://sourceware.cygnus.com/bzip2} 91@code{bzip2}/@code{libbzip2} version 1.0.2 of 30 December 2001.
86 92
87@code{http://www.cacheprof.org} 93@bf{------------------ END OF THE LICENSE ------------------}
88 94
89@code{http://www.muraroa.demon.co.uk} 95Web sites:
90 96
91@code{bzip2}/@code{libbzip2} version 1.0 of 21 March 2000. 97@code{http://sources.redhat.com/bzip2}
98
99@code{http://www.cacheprof.org}
92 100
93PATENTS: To the best of my knowledge, @code{bzip2} does not use any patented 101PATENTS: To the best of my knowledge, @code{bzip2} does not use any patented
94algorithms. However, I do not have the resources available to carry out 102algorithms. However, I do not have the resources available to carry out
@@ -101,7 +109,6 @@ above statement.
101 109
102 110
103 111
104@node Overview, Implementation, Top, Top
105@chapter Introduction 112@chapter Introduction
106 113
107@code{bzip2} compresses files using the Burrows-Wheeler 114@code{bzip2} compresses files using the Burrows-Wheeler
@@ -134,7 +141,7 @@ and nothing else.
134@unnumberedsubsubsec NAME 141@unnumberedsubsubsec NAME
135@itemize 142@itemize
136@item @code{bzip2}, @code{bunzip2} 143@item @code{bzip2}, @code{bunzip2}
137- a block-sorting file compressor, v1.0 144- a block-sorting file compressor, v1.0.2
138@item @code{bzcat} 145@item @code{bzcat}
139- decompresses files to stdout 146- decompresses files to stdout
140@item @code{bzip2recover} 147@item @code{bzip2recover}
@@ -264,6 +271,11 @@ This really performs a trial decompression and throws away the result.
264Force overwrite of output files. Normally, @code{bzip2} will not overwrite 271Force overwrite of output files. Normally, @code{bzip2} will not overwrite
265existing output files. Also forces @code{bzip2} to break hard links 272existing output files. Also forces @code{bzip2} to break hard links
266to files, which it otherwise wouldn't do. 273to files, which it otherwise wouldn't do.
274
275@code{bzip2} normally declines to decompress files which don't have the
276correct magic header bytes. If forced (@code{-f}), however, it will
277pass such files through unmodified. This is how GNU @code{gzip}
278behaves.
267@item -k --keep 279@item -k --keep
268Keep (don't delete) input files during compression 280Keep (don't delete) input files during compression
269or decompression. 281or decompression.
@@ -286,9 +298,13 @@ Further @code{-v}'s increase the verbosity level, spewing out lots of
286information which is primarily of interest for diagnostic purposes. 298information which is primarily of interest for diagnostic purposes.
287@item -L --license -V --version 299@item -L --license -V --version
288Display the software version, license terms and conditions. 300Display the software version, license terms and conditions.
289@item -1 to -9 301@item -1 (or --fast) to -9 (or --best)
290Set the block size to 100 k, 200 k .. 900 k when compressing. Has no 302Set the block size to 100 k, 200 k .. 900 k when compressing. Has no
291effect when decompressing. See MEMORY MANAGEMENT below. 303effect when decompressing. See MEMORY MANAGEMENT below.
304The @code{--fast} and @code{--best} aliases are primarily for GNU
305@code{gzip} compatibility. In particular, @code{--fast} doesn't make
306things significantly faster. And @code{--best} merely selects the
307default behaviour.
292@item -- 308@item --
293Treats all subsequent arguments as file names, even if they start 309Treats all subsequent arguments as file names, even if they start
294with a dash. This is so you can handle files with names beginning 310with a dash. This is so you can handle files with names beginning
@@ -389,21 +405,19 @@ integrity of the resulting files, and decompress those which are
389undamaged. 405undamaged.
390 406
391@code{bzip2recover} 407@code{bzip2recover}
392takes a single argument, the name of the damaged file, 408takes a single argument, the name of the damaged file, and writes a
393and writes a number of files @code{rec0001file.bz2}, 409number of files @code{rec00001file.bz2}, @code{rec00002file.bz2}, etc,
394 @code{rec0002file.bz2}, etc, containing the extracted blocks. 410containing the extracted blocks. The output filenames are designed so
395 The output filenames are designed so that the use of 411that the use of wildcards in subsequent processing -- for example,
396 wildcards in subsequent processing -- for example, 412@code{bzip2 -dc rec*file.bz2 > recovered_data} -- processes the files in
397@code{bzip2 -dc rec*file.bz2 > recovered_data} -- lists the files in 413the correct order.
398 the correct order.
399 414
400@code{bzip2recover} should be of most use dealing with large @code{.bz2} 415@code{bzip2recover} should be of most use dealing with large @code{.bz2}
401 files, as these will contain many blocks. It is clearly 416files, as these will contain many blocks. It is clearly futile to use
402 futile to use it on damaged single-block files, since a 417it on damaged single-block files, since a damaged block cannot be
403 damaged block cannot be recovered. If you wish to minimise 418recovered. If you wish to minimise any potential data loss through
404any potential data loss through media or transmission errors, 419media or transmission errors, you might consider compressing with a
405you might consider compressing with a smaller 420smaller block size.
406 block size.
407 421
408 422
409@unnumberedsubsubsec PERFORMANCE NOTES 423@unnumberedsubsubsec PERFORMANCE NOTES
@@ -435,22 +449,31 @@ I/O error messages are not as helpful as they could be. @code{bzip2}
435tries hard to detect I/O errors and exit cleanly, but the details of 449tries hard to detect I/O errors and exit cleanly, but the details of
436what the problem is sometimes seem rather misleading. 450what the problem is sometimes seem rather misleading.
437 451
438This manual page pertains to version 1.0 of @code{bzip2}. Compressed 452This manual page pertains to version 1.0.2 of @code{bzip2}. Compressed
439data created by this version is entirely forwards and backwards 453data created by this version is entirely forwards and backwards
440compatible with the previous public releases, versions 0.1pl2, 0.9.0 and 454compatible with the previous public releases, versions 0.1pl2, 0.9.0,
4410.9.5, but with the following exception: 0.9.0 and above can correctly 4550.9.5, 1.0.0 and 1.0.1, but with the following exception: 0.9.0 and
442decompress multiple concatenated compressed files. 0.1pl2 cannot do 456above can correctly decompress multiple concatenated compressed files.
443this; it will stop after decompressing just the first file in the 4570.1pl2 cannot do this; it will stop after decompressing just the first
444stream. 458file in the stream.
459
460@code{bzip2recover} versions prior to this one, 1.0.2, used 32-bit
461integers to represent bit positions in compressed files, so it could not
462handle compressed files more than 512 megabytes long. Version 1.0.2 and
463above uses 64-bit ints on some platforms which support them (GNU
464supported targets, and Windows). To establish whether or not
465@code{bzip2recover} was built with such a limitation, run it without
466arguments. In any event you can build yourself an unlimited version if
467you can recompile it with @code{MaybeUInt64} set to be an unsigned
46864-bit integer.
445 469
446@code{bzip2recover} uses 32-bit integers to represent bit positions in
447compressed files, so it cannot handle compressed files more than 512
448megabytes long. This could easily be fixed.
449 470
450 471
451@unnumberedsubsubsec AUTHOR 472@unnumberedsubsubsec AUTHOR
452Julian Seward, @code{jseward@@acm.org}. 473Julian Seward, @code{jseward@@acm.org}.
453 474
475@code{http://sources.redhat.com/bzip2}
476
454The ideas embodied in @code{bzip2} are due to (at least) the following 477The ideas embodied in @code{bzip2} are due to (at least) the following
455people: Michael Burrows and David Wheeler (for the block sorting 478people: Michael Burrows and David Wheeler (for the block sorting
456transformation), David Wheeler (again, for the Huffman coder), Peter 479transformation), David Wheeler (again, for the Huffman coder), Peter
@@ -461,8 +484,9 @@ indebted for their help, support and advice. See the manual in the
461source distribution for pointers to sources of documentation. Christian 484source distribution for pointers to sources of documentation. Christian
462von Roques encouraged me to look for faster sorting algorithms, so as to 485von Roques encouraged me to look for faster sorting algorithms, so as to
463speed up compression. Bela Lubkin encouraged me to improve the 486speed up compression. Bela Lubkin encouraged me to improve the
464worst-case compression performance. Many people sent patches, helped 487worst-case compression performance. The @code{bz*} scripts are derived
465with portability problems, lent machines, gave advice and were generally 488from those of GNU @code{gzip}. Many people sent patches, helped with
489portability problems, lent machines, gave advice and were generally
466helpful. 490helpful.
467 491
468@end quotation 492@end quotation
@@ -1769,16 +1793,20 @@ was compiled with @code{BZ_NO_STDIO} set.
1769For a normal compile, an assertion failure yields the message 1793For a normal compile, an assertion failure yields the message
1770@example 1794@example
1771 bzip2/libbzip2: internal error number N. 1795 bzip2/libbzip2: internal error number N.
1772 This is a bug in bzip2/libbzip2, 1.0 of 21-Mar-2000. 1796 This is a bug in bzip2/libbzip2, 1.0.2, 30-Dec-2001.
1773 Please report it to me at: jseward@@acm.org. If this happened 1797 Please report it to me at: jseward@@acm.org. If this happened
1774 when you were using some program which uses libbzip2 as a 1798 when you were using some program which uses libbzip2 as a
1775 component, you should also report this bug to the author(s) 1799 component, you should also report this bug to the author(s)
1776 of that program. Please make an effort to report this bug; 1800 of that program. Please make an effort to report this bug;
1777 timely and accurate bug reports eventually lead to higher 1801 timely and accurate bug reports eventually lead to higher
1778 quality software. Thanks. Julian Seward, 21 March 2000. 1802 quality software. Thanks. Julian Seward, 30 December 2001.
1779@end example 1803@end example
1780where @code{N} is some error code number. @code{exit(3)} 1804where @code{N} is some error code number. If @code{N == 1007}, it also
1781is then called. 1805prints some extra text advising the reader that unreliable memory is
1806often associated with internal error 1007. (This is a
1807frequently-observed-phenomenon with versions 1.0.0/1.0.1).
1808
1809@code{exit(3)} is then called.
1782 1810
1783For a @code{stdio}-free library, assertion failures result 1811For a @code{stdio}-free library, assertion failures result
1784in a call to a function declared as: 1812in a call to a function declared as:
@@ -2056,10 +2084,10 @@ Maybe this isn't what you want.
2056If you want a compressor and/or library which is faster, uses less 2084If you want a compressor and/or library which is faster, uses less
2057memory but gets pretty good compression, and has minimal latency, 2085memory but gets pretty good compression, and has minimal latency,
2058consider Jean-loup 2086consider Jean-loup
2059Gailly's and Mark Adler's work, @code{zlib-1.1.2} and 2087Gailly's and Mark Adler's work, @code{zlib-1.1.3} and
2060@code{gzip-1.2.4}. Look for them at 2088@code{gzip-1.2.4}. Look for them at
2061 2089
2062@code{http://www.cdrom.com/pub/infozip/zlib} and 2090@code{http://www.zlib.org} and
2063@code{http://www.gzip.org} respectively. 2091@code{http://www.gzip.org} respectively.
2064 2092
2065For something faster and lighter still, you might try Markus F X J 2093For something faster and lighter still, you might try Markus F X J