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