jpayne@68
|
1 .TH pbzip2 1
|
jpayne@68
|
2 .SH NAME
|
jpayne@68
|
3 pbzip2 \- parallel bzip2 file compressor, v1.1.10
|
jpayne@68
|
4 .SH SYNOPSIS
|
jpayne@68
|
5 .B pbzip2
|
jpayne@68
|
6 .RB [ " \-123456789 " ]
|
jpayne@68
|
7 .RB [ " \-b#cdfhklm#p#qrS#tvVz " ]
|
jpayne@68
|
8 [
|
jpayne@68
|
9 .I "filenames \&..."
|
jpayne@68
|
10 ]
|
jpayne@68
|
11 .SH DESCRIPTION
|
jpayne@68
|
12 .I pbzip2
|
jpayne@68
|
13 is a parallel implementation of the bzip2 block-sorting file
|
jpayne@68
|
14 compressor that uses pthreads and achieves near-linear speedup on SMP
|
jpayne@68
|
15 machines. The output of this version is fully compatible with bzip2
|
jpayne@68
|
16 v1.0.2 or newer (ie: anything compressed with
|
jpayne@68
|
17 .I pbzip2
|
jpayne@68
|
18 can be decompressed with bzip2).
|
jpayne@68
|
19 .PP
|
jpayne@68
|
20 .I pbzip2
|
jpayne@68
|
21 should work on any system that has a pthreads compatible C++
|
jpayne@68
|
22 compiler (such as gcc). It has been tested on: Linux, Windows (cygwin),
|
jpayne@68
|
23 Solaris, Tru64/OSF1, HP-UX, and Irix.
|
jpayne@68
|
24 .PP
|
jpayne@68
|
25 The default settings for
|
jpayne@68
|
26 .I pbzip2
|
jpayne@68
|
27 will work well in most cases. The only switch you will likely need to
|
jpayne@68
|
28 use is -d to decompress files and -p to set the # of processors for
|
jpayne@68
|
29 .I pbzip2
|
jpayne@68
|
30 to use if autodetect is not supported
|
jpayne@68
|
31 on your system, or you want to use a specific # of CPUs.
|
jpayne@68
|
32 .SH OPTIONS
|
jpayne@68
|
33 .TP
|
jpayne@68
|
34 .B \-b#
|
jpayne@68
|
35 Where # is block size in 100k steps (default 9 = 900k)
|
jpayne@68
|
36 .TP
|
jpayne@68
|
37 .B \-c, \-\-stdout
|
jpayne@68
|
38 Output to standard out (stdout)
|
jpayne@68
|
39 .TP
|
jpayne@68
|
40 .B \-d,\-\-decompress
|
jpayne@68
|
41 Decompress file
|
jpayne@68
|
42 .TP
|
jpayne@68
|
43 .B \-f,\-\-force
|
jpayne@68
|
44 Force, overwrite existing output file
|
jpayne@68
|
45 .TP
|
jpayne@68
|
46 .B \-h,\-\-help
|
jpayne@68
|
47 Print this help message
|
jpayne@68
|
48 .TP
|
jpayne@68
|
49 .B \-k,\-\-keep
|
jpayne@68
|
50 Keep input file, do not delete
|
jpayne@68
|
51 .TP
|
jpayne@68
|
52 .B \-l,\-\-loadavg
|
jpayne@68
|
53 Load average determines max number processors to use
|
jpayne@68
|
54 .TP
|
jpayne@68
|
55 .B \-m#
|
jpayne@68
|
56 Where # is max memory usage in 1MB steps (default 100 = 100MB)
|
jpayne@68
|
57 .TP
|
jpayne@68
|
58 .B \-p#
|
jpayne@68
|
59 Where # is the number of processors (default: autodetect)
|
jpayne@68
|
60 .TP
|
jpayne@68
|
61 .B \-q,\-\-quiet
|
jpayne@68
|
62 Quiet mode (default)
|
jpayne@68
|
63 .TP
|
jpayne@68
|
64 .B \-r,\-\-read
|
jpayne@68
|
65 Read entire input file into RAM and split between processors
|
jpayne@68
|
66 .TP
|
jpayne@68
|
67 .B \-S#
|
jpayne@68
|
68 Child thread stack size in 1KB steps (default stack size if unspecified)
|
jpayne@68
|
69 .TP
|
jpayne@68
|
70 .B \-t,\-\-test
|
jpayne@68
|
71 Test compressed file integrity
|
jpayne@68
|
72 .TP
|
jpayne@68
|
73 .B \-v,\-\-verbose
|
jpayne@68
|
74 Verbose mode
|
jpayne@68
|
75 .TP
|
jpayne@68
|
76 .B \-V
|
jpayne@68
|
77 Display version info for
|
jpayne@68
|
78 .I pbzip2
|
jpayne@68
|
79 then exit
|
jpayne@68
|
80 .TP
|
jpayne@68
|
81 .B \-z,\-\-compress
|
jpayne@68
|
82 Compress file (default)
|
jpayne@68
|
83 .TP
|
jpayne@68
|
84 .B \-1,\-\-fast ... \-9,\-\-best
|
jpayne@68
|
85 Set BWT block size to 100k .. 900k (default 900k).
|
jpayne@68
|
86 .TP
|
jpayne@68
|
87 .B \-\-ignore-trailing-garbage=#
|
jpayne@68
|
88 Ignore trailing garbage flag (1 - ignored; 0 - forbidden)
|
jpayne@68
|
89 .PP
|
jpayne@68
|
90 If no file names are given, pbzip2 compresses or decompresses from standard input to standard output.
|
jpayne@68
|
91 .SH FILE SIZES
|
jpayne@68
|
92 You should be able to compress files larger than 4GB with
|
jpayne@68
|
93 .I pbzip2.
|
jpayne@68
|
94 .PP
|
jpayne@68
|
95 Files that are compressed with
|
jpayne@68
|
96 .I pbzip2
|
jpayne@68
|
97 are broken up into pieces and
|
jpayne@68
|
98 each individual piece is compressed. This is how
|
jpayne@68
|
99 .I pbzip2
|
jpayne@68
|
100 runs faster
|
jpayne@68
|
101 on multiple CPUs since the pieces can be compressed simultaneously.
|
jpayne@68
|
102 The final .bz2 file may be slightly larger than if it was compressed
|
jpayne@68
|
103 with the regular bzip2 program due to this file splitting (usually
|
jpayne@68
|
104 less than 0.2% larger). Files that are compressed with
|
jpayne@68
|
105 .I pbzip2
|
jpayne@68
|
106 will also gain considerable speedup when decompressed using
|
jpayne@68
|
107 .I pbzip2.
|
jpayne@68
|
108 .PP
|
jpayne@68
|
109 Files that were compressed using bzip2 will not see speedup since
|
jpayne@68
|
110 bzip2 packages the data into a single chunk that cannot be split
|
jpayne@68
|
111 between processors.
|
jpayne@68
|
112 .SH EXAMPLES
|
jpayne@68
|
113 Example 1: pbzip2 myfile.tar
|
jpayne@68
|
114 .PP
|
jpayne@68
|
115 This example will compress the file "myfile.tar" into the compressed file
|
jpayne@68
|
116 "myfile.tar.bz2". It will use the autodetected # of processors (or 2
|
jpayne@68
|
117 processors if autodetect not supported) with the default file block size
|
jpayne@68
|
118 of 900k and default BWT block size of 900k.
|
jpayne@68
|
119 .PP
|
jpayne@68
|
120 Example 2: pbzip2 -b15k myfile.tar
|
jpayne@68
|
121 .PP
|
jpayne@68
|
122 This example will compress the file "myfile.tar" into the compressed file
|
jpayne@68
|
123 "myfile.tar.bz2". It will use the autodetected # of processors (or 2
|
jpayne@68
|
124 processors if autodetect not supported) with a file block size of 1500k
|
jpayne@68
|
125 and a BWT block size of 900k. The file "myfile.tar" will not be deleted
|
jpayne@68
|
126 after compression is finished.
|
jpayne@68
|
127 .PP
|
jpayne@68
|
128 Example 3: pbzip2 -p4 -r -5 myfile.tar second*.txt
|
jpayne@68
|
129 .PP
|
jpayne@68
|
130 This example will compress the file "myfile.tar" into the compressed file
|
jpayne@68
|
131 "myfile.tar.bz2". It will use 4 processors with a BWT block size of 500k.
|
jpayne@68
|
132 The file block size will be the size of "myfile.tar" divided by 4 (# of
|
jpayne@68
|
133 processors) so that the data will be split evenly among each processor.
|
jpayne@68
|
134 This requires you have enough RAM for pbzip2 to read the entire file into
|
jpayne@68
|
135 memory for compression. Pbzip2 will then use the same options to compress
|
jpayne@68
|
136 all other files that match the wildcard "second*.txt" in that directory.
|
jpayne@68
|
137 .PP
|
jpayne@68
|
138 Example 4: tar cf myfile.tar.bz2 --use-compress-prog=pbzip2 dir_to_compress/
|
jpayne@68
|
139 .br
|
jpayne@68
|
140 Example 4: tar -c directory_to_compress/ | pbzip2 -c > myfile.tar.bz2
|
jpayne@68
|
141 .PP
|
jpayne@68
|
142 These examples will compress the data being given to pbzip2 via pipe
|
jpayne@68
|
143 from TAR into the compressed file "myfile.tar.bz2". It will use the
|
jpayne@68
|
144 autodetected # of processors (or 2 processors if autodetect not
|
jpayne@68
|
145 supported) with the default file block size of 900k and default BWT
|
jpayne@68
|
146 block size of 900k. TAR is collecting all of the files from the
|
jpayne@68
|
147 "directory_to_compress/" directory and passing the data to pbzip2 as
|
jpayne@68
|
148 it works.
|
jpayne@68
|
149 .PP
|
jpayne@68
|
150 Example 5: pbzip2 -d -m500 myfile.tar.bz2
|
jpayne@68
|
151 .PP
|
jpayne@68
|
152 This example will decompress the file "myfile.tar.bz2" into the decompressed
|
jpayne@68
|
153 file "myfile.tar". It will use the autodetected # of processors (or 2
|
jpayne@68
|
154 processors if autodetect not supported). It will use a maximum of 500MB of
|
jpayne@68
|
155 memory for decompression. The switches -b, -r, and -1..-9 are not valid for
|
jpayne@68
|
156 decompression.
|
jpayne@68
|
157 .PP
|
jpayne@68
|
158 Example 6: pbzip2 -dc myfile.tar.bz2 | tar x
|
jpayne@68
|
159 .PP
|
jpayne@68
|
160 This example will decompress and untar the file "myfile.tar.bz2" piping
|
jpayne@68
|
161 the output of the decompressing pbzip2 to tar.
|
jpayne@68
|
162 .PP
|
jpayne@68
|
163 Example 7: pbzip2 -c < myfile.txt > myfile.txt.bz2
|
jpayne@68
|
164 .PP
|
jpayne@68
|
165 This example will read myfile.txt from standard input compressing
|
jpayne@68
|
166 it to standard output which is redirected to to myfile.txt.bz2.
|
jpayne@68
|
167 .SH "SEE ALSO"
|
jpayne@68
|
168 bzip2(1)
|
jpayne@68
|
169 gzip(1)
|
jpayne@68
|
170 lzip(1)
|
jpayne@68
|
171 rzip(1)
|
jpayne@68
|
172 zip(1)
|
jpayne@68
|
173 .SH AUTHOR
|
jpayne@68
|
174 Jeff Gilchrist
|
jpayne@68
|
175
|
jpayne@68
|
176 http://compression.ca
|