1pbzip2(1) General Commands Manual pbzip2(1)
2
3
4
6 pbzip2 - parallel bzip2 file compressor, v1.0.2
7
9 pbzip2 [ -123456789 ] [ -b#cdfklp#rtvV ] [ 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 the file block size in 100k (default 9 = 900k)
29
30 -c Output to standard out (stdout)
31
32 -d Decompress file
33
34 -f Force, overwrite existing output file
35
36 -k Keep input file, do not delete
37
38 -l Load average determines max number processors to use
39
40 -p# Where # is the number of processors (default: autodetect)
41
42 -r Read entire input file into RAM and split between processors
43
44 -t Test compressed file integrity
45
46 -v Verbose mode
47
48 -V Display version info for pbzip2 then exit
49
50 -1..9 Set BWT block size to 100k .. 900k (default 900k)
51
53 You should be able to compress files larger than 4GB with pbzip2.
54
55 Files that are compressed with pbzip2 are broken up into pieces and
56 each individual piece is compressed. This is how pbzip2 runs faster on
57 multiple CPUs since the pieces can be compressed simultaneously. The
58 final .bz2 file may be slightly larger than if it was compressed with
59 the regular bzip2 program due to this file splitting (usually less than
60 0.2% larger). Files that are compressed with pbzip2 will also gain
61 considerable speedup when decompressed using pbzip2.
62
63 Files that were compressed using bzip2 will not see speedup since bzip2
64 packages the data into a single chunk that cannot be split between pro‐
65 cessors. If you have a large file that was created with bzip2 (say
66 1.5GB for example) you will likely not be able to decompress the file
67 with pbzip2 since pbzip2 will try to allocate 1.5GB of memory to decom‐
68 press it, and that call might fail depending on your system resources.
69 If the same 1.5GB file had of been compressed with pbzip2, it would
70 decompress fine with pbzip2. If you are unable to decompress a file
71 with pbzip2 due to its size, use the regular bzip2 instead.
72
74 Example 1: pbzip2 myfile.tar
75
76 This example will compress the file "myfile.tar" into the compressed
77 file "myfile.tar.bz2". It will use the autodetected # of processors (or
78 2 processors if autodetect not supported) with the default file block
79 size of 900k and default BWT block size of 900k.
80
81 Example 2: pbzip2 -b15k myfile.tar
82
83 This example will compress the file "myfile.tar" into the compressed
84 file "myfile.tar.bz2". It will use the autodetected # of processors (or
85 2 processors if autodetect not supported) with a file block size of
86 1500k and a BWT block size of 900k. The file "myfile.tar" will not be
87 deleted after compression is finished.
88
89 Example 3: pbzip2 -p4 -r -5 myfile.tar second*.txt
90
91 This example will compress the file "myfile.tar" into the compressed
92 file "myfile.tar.bz2". It will use 4 processors with a BWT block size
93 of 500k. The file block size will be the size of "myfile.tar" divided
94 by 4 (# of processors) so that the data will be split evenly among each
95 processor. This requires you have enough RAM for pbzip2 to read the
96 entire file into memory for compression. Pbzip2 will then use the same
97 options to compress all other files that match the wildcard "sec‐
98 ond*.txt" in that directory.
99
100 Example 4: pbzip2 -d myfile.tar.bz2
101
102 This example will decompress the file "myfile.tar.bz2" into the decom‐
103 pressed file "myfile.tar". It will use the autodetected # of processors
104 (or 2 processors if autodetect not supported). The switches -b, -r, and
105 -1..-9 are not valid for decompression.
106
108 bzip2(1)
109
111 Jeff Gilchrist
112
113 http://compression.ca
114
115
116
117 pbzip2(1)