Opentopia Directory Encyclopedia Tools

Bzip2

Encyclopedia : B : BZ : BZI : Bzip2


The correct title of this } is }}}. The initial letter is capitalized due to [Naming conventions #Lower case first lettertechnical restrictions].
bzip2 is a free software/open source data compression algorithm and program developed by Julian Seward. Seward made the first public release of bzip2, version 0.15, in July 1996. The compressor's stability and popularity grew over the next several years, and Seward released version 1.0 in late 2000.

Compression efficiency

bzip2 compresses most files more effectively than more traditional gzip or ZIP, but is slower. In this manner it is fairly similar to other recent-generation compression algorithms. Unlike other formats such as RAR or ZIP (and similar to gzip), bzip2 is only a data compressor, not an archiver. The program itself has no facilities for multiple files, encryption or archive-splitting, in the UNIX tradition instead relying on separate external utilities such as tar and GnuPG for these tasks.

In some cases, bzip2 is surpassed by 7z and RAR formats in terms of absolute compression efficiency. With the constant effect of Moore's Law making computer time less and less important, compression methods like these have become quite popular. According to the author, bzip2 gets within ten to fifteen percent of the "best" class of compression algorithms currently known (PPM), although it is roughly twice as fast at compression and six times faster at decompression.

bzip2 uses the Burrows-Wheeler transform to convert frequently recurring character sequences into strings of identical letters, and then applies a move-to-front transform and finally Huffman coding. In bzip2 the blocks are all the same size in plaintext, which can be selected by a command-line argument, and are marked in compresstext by an arbitrary bit sequence derived from the decimal representation of pi.

Originally, bzip2's ancestor bzip used arithmetic coding after the blocksort; this was discontinued because of the patent restriction.

Use

In Unix, bzip2 can be used combined with or independently of tar: bzip2 file to compress and bzip2 -d file.bz2 to uncompress (the alias bunzip2 for decompression may also be used).

bzip2's command line flags are mostly the same as in gzip. So, to extract from a bzip2-compressed tar-file:

bzip2 -cd archivefile.tar.bz2 | tar -xvf -
To create a bzip2-compressed tar-file:

tar -cvf - filenames | bzip2 -9 > archivefile.tar.bz2
GNU tar supports a -j flag, which allows creation of tar.bz2 files without a pipeline:
tar -cvjf archivefile.tar.bz2 file-list
Decompressing in GNU tar:
tar -xvjf archivefile.tar.bz2

See also

  1. redirect

External links

 


From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.

Search Titles
0123456789
ABCDEFGHIJ
KLMNOPQRST
UVWXYZ?

E-mail this article to:

Personal Message: