| 1 |
.PU |
| 2 |
.TH bzip2 1 |
| 3 |
.SH NAME |
| 4 |
bzme \- recompress gziped, ziped, ... files into bzip2 |
| 5 |
|
| 6 |
.SH SYNOPSIS |
| 7 |
.ll +8 |
| 8 |
.B bzmz |
| 9 |
.RB [ " \-fh " ] |
| 10 |
[ |
| 11 |
.I "filenames \&..." |
| 12 |
] |
| 13 |
|
| 14 |
.SH DESCRIPTION |
| 15 |
.I bzme |
| 16 |
recompresses files using the Burrows-Wheeler block sorting text compression |
| 17 |
algorithm, and Huffman coding. Compression is generally considerably better |
| 18 |
than that achieved by more conventional LZ77/LZ78-based compressors, |
| 19 |
and approaches the performance of the PPM family of statistical compressors. |
| 20 |
|
| 21 |
.I bzme |
| 22 |
expects a list of file names to accompany the command-line flags. |
| 23 |
Each file is replaced by a recompressed version of itself, with the name |
| 24 |
as described in |
| 25 |
.B "NEW NAMES" |
| 26 |
section. |
| 27 |
|
| 28 |
.I bzme |
| 29 |
won't overwrite by default existing files. If you want this to happen, specify |
| 30 |
the \-f flag. |
| 31 |
|
| 32 |
.SH "NEW NAMES" |
| 33 |
.I bzip2 |
| 34 |
attempts to guess the filename for the decompressed file |
| 35 |
from that of the compressed file as follows: |
| 36 |
|
| 37 |
filename.tgz becomes filename.tar.bz2 |
| 38 |
filename.tar.gz becomes filename.tar.bz2 |
| 39 |
filename.zip becomes filename.tar.bz2 |
| 40 |
filename.z becomes filename.bz2 |
| 41 |
filename.Z becomes filename.bz2 |
| 42 |
filename.gz becomes filename.bz2 |
| 43 |
|
| 44 |
If the file does not end in one of the recognised endings, \fI.tgz\fP, |
| 45 |
|
| 46 |
or \fI.zip\fP, |
| 47 |
.I bzme |
| 48 |
complains that it cannot guess if the name of the recompressed file (ie it |
| 49 |
doesn't detect the original name to be a file compressed in a known format) |
| 50 |
|
| 51 |
.SH OPTIONS |
| 52 |
.TP |
| 53 |
.B \-f |
| 54 |
Force overwrite of output files, even if |
| 55 |
.I -k |
| 56 |
is used. Normally, |
| 57 |
.I bzip2 |
| 58 |
will not overwrite existing output files. |
| 59 |
|
| 60 |
.TP |
| 61 |
.B \-k |
| 62 |
Keep (don't delete) input files during compression |
| 63 |
or decompression. |
| 64 |
.".TP |
| 65 |
.".B \-q --quiet |
| 66 |
."Suppress non-essential warning messages. Messages pertaining to |
| 67 |
."I/O errors and other critical events will not be suppressed. |
| 68 |
.".TP |
| 69 |
.".B \-v --verbose |
| 70 |
."Verbose mode -- dysplay space gain (default) |
| 71 |
.".TP |
| 72 |
.".B \-L --license -V --version |
| 73 |
."Display the software version, license terms and conditions. |
| 74 |
|
| 75 |
.SH SECURITY |
| 76 |
.I bzme |
| 77 |
will keep source file if there's an error while decompressing source file |
| 78 |
or recompressing new file (or |
| 79 |
.I -k |
| 80 |
option is used of course). |
| 81 |
|
| 82 |
.I bzme |
| 83 |
won't overwite the target file, even if |
| 84 |
.I -k |
| 85 |
option is used, if the source file doesn't exists. |
| 86 |
|
| 87 |
As a self-check for your protection, |
| 88 |
.I bzip2 |
| 89 |
uses 32-bit CRCs to make sure that the decompressed version of a file is |
| 90 |
identical to the original. |
| 91 |
.BR |
| 92 |
This offers a better protection against corruption |
| 93 |
of the compressed data than offered by gzip. |
| 94 |
|
| 95 |
.SH SPACE GAIN |
| 96 |
Compression is only performed if the compressed file is smaller than the |
| 97 |
original: the original file is only removed if the newly compressed file |
| 98 |
is smaller, else the new recompressed file is deleted. |
| 99 |
|
| 100 |
Text (aka non binary) files're quite nearly always better compressed |
| 101 |
by bzip2 rather than gzip. |
| 102 |
|
| 103 |
.SH MEMORY VS SPACE TRADEOFF |
| 104 |
There're two things : |
| 105 |
.TP |
| 106 |
.B Consumed CPU time |
| 107 |
The needed cpu time is reduced by decompressing only one time. |
| 108 |
Files to recompress were compressed through compress or gzip, used to be |
| 109 |
decompressed by gunzip -t in order to check that the original file was ok. |
| 110 |
This resulted in passing two times the data in the decompression process |
| 111 |
(one to check integrity, one to recompress). |
| 112 |
temporary space usage will be zero since bzme will use a pipe |
| 113 |
rather than a temporary file as it does in the early ages. |
| 114 |
Source error're detected through bash PIPESTATUS feature. |
| 115 |
.TP |
| 116 |
.B Occupied space |
| 117 |
While recompressing files, if they were compressed through compress or gzip, |
| 118 |
temporary space usage will be zero since bzme will use a pipe |
| 119 |
rather than a temporary file as it did in the early ages. |
| 120 |
Source error're detected through bash PIPESTATUS feature. |
| 121 |
Zip files're still fully decompressed on disk. |
| 122 |
|
| 123 |
As for the recompressed file and original file, only the smallest file |
| 124 |
is kept. |
| 125 |
|
| 126 |
.SH RETURN VALUES |
| 127 |
0 for a normal exit. |
| 128 |
1 will be returned if an unknown option is passed. |
| 129 |
|
| 130 |
.SH BUGS |
| 131 |
Bash getopt (which is used to analyse options) isn't gnu style aware, ie cmd |
| 132 |
opt1 file1 file2 opt2 will result in ignoring opt2 option. |
| 133 |
|
| 134 |
Solaris/SunOs du doesn't supports gnu option, and thus, bzme won't |
| 135 |
work on those OSes unless GNU fileutils got installed. |
| 136 |
.BR |
| 137 |
I had once a day patched bzme to use right options for solaris but i had |
| 138 |
lost my changes. |
| 139 |
.LP |
| 140 |
So solaris remains unsupported. |
| 141 |
|
| 142 |
.SH "SEE ALSO" |
| 143 |
bzip2(1), bunzip2(1) |
| 144 |
|
| 145 |
.SH AUTHOR |
| 146 |
Thierry Vignaud <[email protected]>, 1999-2002 |