diff options
Diffstat (limited to 'manual.texi')
-rw-r--r-- | manual.texi | 114 |
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 |
5 | This file documents bzip2 version 1.0, and associated library | 5 | This file documents bzip2 version 1.0.2, and associated library |
6 | libbzip2, written by Julian Seward (jseward@acm.org). | 6 | libbzip2, written by Julian Seward (jseward@acm.org). |
7 | 7 | ||
8 | Copyright (C) 1996-2000 Julian R Seward | 8 | Copyright (C) 1996-2002 Julian R Seward |
9 | 9 | ||
10 | Permission is granted to make and distribute verbatim copies of | 10 | Permission is granted to make and distribute verbatim copies of |
11 | this manual provided the copyright notice and this permission notice | 11 | this 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 | |||
45 | The following text is the License for this software. You should | ||
46 | find it identical to that contained in the file LICENSE in the | ||
47 | source distribution. | ||
48 | |||
49 | @bf{------------------ START OF THE LICENSE ------------------} | ||
44 | 50 | ||
45 | This program, @code{bzip2}, | 51 | This program, @code{bzip2}, |
46 | and associated library @code{libbzip2}, are | 52 | and associated library @code{libbzip2}, are |
47 | Copyright (C) 1996-2000 Julian R Seward. All rights reserved. | 53 | Copyright (C) 1996-2002 Julian R Seward. All rights reserved. |
48 | 54 | ||
49 | Redistribution and use in source and binary forms, with or without | 55 | Redistribution and use in source and binary forms, with or without |
50 | modification, are permitted provided that the following conditions | 56 | modification, 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} | 95 | Web 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 | ||
93 | PATENTS: To the best of my knowledge, @code{bzip2} does not use any patented | 101 | PATENTS: To the best of my knowledge, @code{bzip2} does not use any patented |
94 | algorithms. However, I do not have the resources available to carry out | 102 | algorithms. 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. | |||
264 | Force overwrite of output files. Normally, @code{bzip2} will not overwrite | 271 | Force overwrite of output files. Normally, @code{bzip2} will not overwrite |
265 | existing output files. Also forces @code{bzip2} to break hard links | 272 | existing output files. Also forces @code{bzip2} to break hard links |
266 | to files, which it otherwise wouldn't do. | 273 | to files, which it otherwise wouldn't do. |
274 | |||
275 | @code{bzip2} normally declines to decompress files which don't have the | ||
276 | correct magic header bytes. If forced (@code{-f}), however, it will | ||
277 | pass such files through unmodified. This is how GNU @code{gzip} | ||
278 | behaves. | ||
267 | @item -k --keep | 279 | @item -k --keep |
268 | Keep (don't delete) input files during compression | 280 | Keep (don't delete) input files during compression |
269 | or decompression. | 281 | or decompression. |
@@ -286,9 +298,13 @@ Further @code{-v}'s increase the verbosity level, spewing out lots of | |||
286 | information which is primarily of interest for diagnostic purposes. | 298 | information which is primarily of interest for diagnostic purposes. |
287 | @item -L --license -V --version | 299 | @item -L --license -V --version |
288 | Display the software version, license terms and conditions. | 300 | Display the software version, license terms and conditions. |
289 | @item -1 to -9 | 301 | @item -1 (or --fast) to -9 (or --best) |
290 | Set the block size to 100 k, 200 k .. 900 k when compressing. Has no | 302 | Set the block size to 100 k, 200 k .. 900 k when compressing. Has no |
291 | effect when decompressing. See MEMORY MANAGEMENT below. | 303 | effect when decompressing. See MEMORY MANAGEMENT below. |
304 | The @code{--fast} and @code{--best} aliases are primarily for GNU | ||
305 | @code{gzip} compatibility. In particular, @code{--fast} doesn't make | ||
306 | things significantly faster. And @code{--best} merely selects the | ||
307 | default behaviour. | ||
292 | @item -- | 308 | @item -- |
293 | Treats all subsequent arguments as file names, even if they start | 309 | Treats all subsequent arguments as file names, even if they start |
294 | with a dash. This is so you can handle files with names beginning | 310 | with 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 | |||
389 | undamaged. | 405 | undamaged. |
390 | 406 | ||
391 | @code{bzip2recover} | 407 | @code{bzip2recover} |
392 | takes a single argument, the name of the damaged file, | 408 | takes a single argument, the name of the damaged file, and writes a |
393 | and writes a number of files @code{rec0001file.bz2}, | 409 | number of files @code{rec00001file.bz2}, @code{rec00002file.bz2}, etc, |
394 | @code{rec0002file.bz2}, etc, containing the extracted blocks. | 410 | containing the extracted blocks. The output filenames are designed so |
395 | The output filenames are designed so that the use of | 411 | that 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 | 413 | the 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 | 416 | files, as these will contain many blocks. It is clearly futile to use |
402 | futile to use it on damaged single-block files, since a | 417 | it on damaged single-block files, since a damaged block cannot be |
403 | damaged block cannot be recovered. If you wish to minimise | 418 | recovered. If you wish to minimise any potential data loss through |
404 | any potential data loss through media or transmission errors, | 419 | media or transmission errors, you might consider compressing with a |
405 | you might consider compressing with a smaller | 420 | smaller 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} | |||
435 | tries hard to detect I/O errors and exit cleanly, but the details of | 449 | tries hard to detect I/O errors and exit cleanly, but the details of |
436 | what the problem is sometimes seem rather misleading. | 450 | what the problem is sometimes seem rather misleading. |
437 | 451 | ||
438 | This manual page pertains to version 1.0 of @code{bzip2}. Compressed | 452 | This manual page pertains to version 1.0.2 of @code{bzip2}. Compressed |
439 | data created by this version is entirely forwards and backwards | 453 | data created by this version is entirely forwards and backwards |
440 | compatible with the previous public releases, versions 0.1pl2, 0.9.0 and | 454 | compatible with the previous public releases, versions 0.1pl2, 0.9.0, |
441 | 0.9.5, but with the following exception: 0.9.0 and above can correctly | 455 | 0.9.5, 1.0.0 and 1.0.1, but with the following exception: 0.9.0 and |
442 | decompress multiple concatenated compressed files. 0.1pl2 cannot do | 456 | above can correctly decompress multiple concatenated compressed files. |
443 | this; it will stop after decompressing just the first file in the | 457 | 0.1pl2 cannot do this; it will stop after decompressing just the first |
444 | stream. | 458 | file in the stream. |
459 | |||
460 | @code{bzip2recover} versions prior to this one, 1.0.2, used 32-bit | ||
461 | integers to represent bit positions in compressed files, so it could not | ||
462 | handle compressed files more than 512 megabytes long. Version 1.0.2 and | ||
463 | above uses 64-bit ints on some platforms which support them (GNU | ||
464 | supported targets, and Windows). To establish whether or not | ||
465 | @code{bzip2recover} was built with such a limitation, run it without | ||
466 | arguments. In any event you can build yourself an unlimited version if | ||
467 | you can recompile it with @code{MaybeUInt64} set to be an unsigned | ||
468 | 64-bit integer. | ||
445 | 469 | ||
446 | @code{bzip2recover} uses 32-bit integers to represent bit positions in | ||
447 | compressed files, so it cannot handle compressed files more than 512 | ||
448 | megabytes long. This could easily be fixed. | ||
449 | 470 | ||
450 | 471 | ||
451 | @unnumberedsubsubsec AUTHOR | 472 | @unnumberedsubsubsec AUTHOR |
452 | Julian Seward, @code{jseward@@acm.org}. | 473 | Julian Seward, @code{jseward@@acm.org}. |
453 | 474 | ||
475 | @code{http://sources.redhat.com/bzip2} | ||
476 | |||
454 | The ideas embodied in @code{bzip2} are due to (at least) the following | 477 | The ideas embodied in @code{bzip2} are due to (at least) the following |
455 | people: Michael Burrows and David Wheeler (for the block sorting | 478 | people: Michael Burrows and David Wheeler (for the block sorting |
456 | transformation), David Wheeler (again, for the Huffman coder), Peter | 479 | transformation), David Wheeler (again, for the Huffman coder), Peter |
@@ -461,8 +484,9 @@ indebted for their help, support and advice. See the manual in the | |||
461 | source distribution for pointers to sources of documentation. Christian | 484 | source distribution for pointers to sources of documentation. Christian |
462 | von Roques encouraged me to look for faster sorting algorithms, so as to | 485 | von Roques encouraged me to look for faster sorting algorithms, so as to |
463 | speed up compression. Bela Lubkin encouraged me to improve the | 486 | speed up compression. Bela Lubkin encouraged me to improve the |
464 | worst-case compression performance. Many people sent patches, helped | 487 | worst-case compression performance. The @code{bz*} scripts are derived |
465 | with portability problems, lent machines, gave advice and were generally | 488 | from those of GNU @code{gzip}. Many people sent patches, helped with |
489 | portability problems, lent machines, gave advice and were generally | ||
466 | helpful. | 490 | helpful. |
467 | 491 | ||
468 | @end quotation | 492 | @end quotation |
@@ -1769,16 +1793,20 @@ was compiled with @code{BZ_NO_STDIO} set. | |||
1769 | For a normal compile, an assertion failure yields the message | 1793 | For 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 |
1780 | where @code{N} is some error code number. @code{exit(3)} | 1804 | where @code{N} is some error code number. If @code{N == 1007}, it also |
1781 | is then called. | 1805 | prints some extra text advising the reader that unreliable memory is |
1806 | often associated with internal error 1007. (This is a | ||
1807 | frequently-observed-phenomenon with versions 1.0.0/1.0.1). | ||
1808 | |||
1809 | @code{exit(3)} is then called. | ||
1782 | 1810 | ||
1783 | For a @code{stdio}-free library, assertion failures result | 1811 | For a @code{stdio}-free library, assertion failures result |
1784 | in a call to a function declared as: | 1812 | in a call to a function declared as: |
@@ -2056,10 +2084,10 @@ Maybe this isn't what you want. | |||
2056 | If you want a compressor and/or library which is faster, uses less | 2084 | If you want a compressor and/or library which is faster, uses less |
2057 | memory but gets pretty good compression, and has minimal latency, | 2085 | memory but gets pretty good compression, and has minimal latency, |
2058 | consider Jean-loup | 2086 | consider Jean-loup |
2059 | Gailly's and Mark Adler's work, @code{zlib-1.1.2} and | 2087 | Gailly'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 | ||
2065 | For something faster and lighter still, you might try Markus F X J | 2093 | For something faster and lighter still, you might try Markus F X J |