pbzip2(1)
๐ pbzip2 ๐
the parallel bzip2 file compressor, v1.1.10 โ she's fast, she's multithreaded, she's your new bestie ๐ฆ
โจ NAME โจ
pbzip2</purl> โ parallel bzip2 file compressor, v1.1.10. no cap, that's literally her whole thing ๐
๐ธ SYNOPSIS ๐ธ
pbzip2 [ -123456789 ] [ -b#cdfhklm#p#qrS#tvVz ] [ filenames ... ]
like... give her some flags, give her some files, she'll handle it ๐ซถ
๐ DESCRIPTION ๐
okay so bestie, here's the tea โ
pbzip2 is a parallel implementation of the bzip2 block-sorting file compressor that uses pthreads and achieves near-linear speedup on SMP machines. and the way that it's fully compatible with bzip2 v1.0.2 or newer?? iconic. like, literally anything compressed with pbzip2 can be decompressed with bzip2. no drama, no beef, they're besties ๐ซถ
pbzip2 should work on any system that has a pthreads compatible C++ compiler (such as gcc). it has been tested on: Linux, Windows (cygwin), Solaris, Tru64/OSF1, HP-UX, and Irix. she gets around ๐
โจ
the default settings for pbzip2 will work well in most cases. the only switch you will likely need to use is -d to decompress files and -p to set the # of processors for pbzip2 to use if autodetect is not supported on your system, or you want to use a specific # of CPUs. that's it. that's the whole vibe check ๐ฆ
๐ OPTIONS ๐
-b#โ where#is block size in 100k steps (default9= 900k) ๐-c,--stdoutโ output to standard out (stdout). straight to the screen, no file, no notes โจ-d,--decompressโ decompress file ๐-f,--forceโ force, overwrite existing output file. she said move ๐-h,--helpโ print this help message ๐-k,--keepโ keep input file, do not delete. emotionally attached, respect it ๐-l,--loadavgโ load average determines max number processors to use ๐-m#โ where#is max memory usage in 1MB steps (default100= 100MB) ๐ง-p#โ where#is the number of processors (default: autodetect) ๐-q,--quietโ quiet mode (default). she's not talking, she's working ๐คซ-r,--readโ read entire input file into RAM and split between processors ๐-S#โ child thread stack size in 1KB steps (default stack size if unspecified) ๐-t,--testโ test compressed file integrity ๐งช-v,--verboseโ verbose mode. now she's yapping (affectionate) ๐ฃ๏ธ-Vโ display version info forpbzip2then exit โ๏ธ-z,--compressโ compress file (default) ๐๏ธ-1,--fast...-9,--bestโ set BWT block size to 100k .. 900k (default 900k) ๐--ignore-trailing-garbage=#โ ignore trailing garbage flag (1- ignored;0- forbidden) ๐๏ธ
if no file names are given, pbzip2 compresses or decompresses from standard input to standard output. periodt ๐
๐ฆ FILE SIZES ๐ฆ
you should be able to compress files larger than 4GB with pbzip2. yeah. big girl energy ๐
files that are compressed with pbzip2 are broken up into pieces and each individual piece is compressed. this is how pbzip2 runs faster on multiple CPUs since the pieces can be compressed simultaneously. the final .bz2 file may be slightly larger than if it was compressed with the regular bzip2 program due to this file splitting (usually less than 0.2% larger). files that are compressed with pbzip2 will also gain considerable speedup when decompressed using pbzip2. trade-off queen ๐
heads up bestie: files that were compressed usingbzip2will not see speedup sincebzip2packages the data into a single chunk that cannot be split between processors. she can't split what's already one blob ๐ญ
๐ EXAMPLES ๐
Example 1: pbzip2 myfile.tar
this example will compress the file "myfile.tar" into the compressed file "myfile.tar.bz2". it will use the autodetected # of processors (or 2 processors if autodetect not supported) with the default file block size of 900k and default BWT block size of 900k. the classic. the standard. she ate ๐ฝ๏ธ
Example 2: pbzip2 -b15k myfile.tar
this example will compress the file "myfile.tar" into the compressed file "myfile.tar.bz2". it will use the autodetected # of processors (or 2 processors if autodetect not supported) with a file block size of 1500k and a BWT block size of 900k. the file "myfile.tar" will not be deleted after compression is finished. she's keeping it ๐
Example 3: pbzip2 -p4 -r -5 myfile.tar second*.txt
this example will compress the file "myfile.tar" into the compressed file "myfile.tar.bz2". it will use 4 processors with a BWT block size of 500k. the file block size will be the size of "myfile.tar" divided by 4 (# of processors) so that the data will be split evenly among each processor. this requires you have enough RAM for pbzip2 to read the entire file into memory for compression. Pbzip2 will then use the same options to compress all other files that match the wildcard "second*.txt" in that directory. multi-file slay โจ
Example 4: tar cf myfile.tar.bz2 --use-compress-prog=pbzip2 dir_to_compress/
Example 4: tar -c directory_to_compress/ | pbzip2 -c > myfile.tar.bz2
these examples will compress the data being given to pbzip2 via pipe from TAR into the compressed file "myfile.tar.bz2". it will use the autodetected # of processors (or 2 processors if autodetect not supported) with the default file block size of 900k and default BWT block size of 900k. TAR is collecting all of the files from the "directory_to_compress/" directory and passing the data to pbzip2 as it works. teamwork makes the dream work ๐ซถ
Example 5: pbzip2 -d -m500 myfile.tar.bz2
this example will decompress the file "myfile.tar.bz2" into the decompressed file "myfile.tar". it will use the autodetected # of processors (or 2 processors if autodetect not supported). it will use a maximum of 500MB of memory for decompression.
lowkey important: the switches-b,-r, and-1..-9are not valid for decompression. they literally don't apply, don't try it ๐
Example 6: pbzip2 -dc myfile.tar.bz2 | tar x
this example will decompress and untar the file "myfile.tar.bz2" piping the output of the decompressing pbzip2 to tar. one line, two jobs, main character energy ๐
Example 7: pbzip2 -c < myfile.txt > myfile.txt.bz2
this example will read myfile.txt from standard input compressing it to standard output which is redirected to to myfile.txt.bz2. (yes, the original really does say "to to". she's quirky like that ๐)
๐ฅ SEE ALSO ๐ฅ
bzip2(1) gzip(1) lzip(1) rzip(1) zip(1)
the whole squad, honestly. go say hi ๐ธ
๐ AUTHOR ๐
Jeff Gilchrist
and that's the whole page bestie!! ๐โจ written by Jeff Gilchrist over at http://compression.ca, pbzip2 version v1.1.10, living in the General Commands Manual section. go compress something big, you got this ๐๐ฆ๐
๐ฆ where this page comes from
- opensuse-leap 16.0: pbzip2 1.1.13-bp160.1.12 ยท BSD-4-Clause
- opensuse-leap 16.0: pbzip2 1.1.13-bp160.1.12 ยท BSD-4-Clause
- opensuse-leap 16.0: pbzip2 1.1.13-bp160.1.12 ยท BSD-4-Clause
- opensuse-leap 16.0: pbzip2 1.1.13-bp160.1.12 ยท BSD-4-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms