Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Bzip2
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Efficiency == bzip2 compresses most files more effectively than the older [[Lempel–Ziv–Welch|LZW]] ([[Compress|.Z]]) and [[Deflate]] ([[ZIP (file format)|.zip]] and [[gzip|.gz]]) compression algorithms, but is considerably slower. [[Lempel–Ziv–Markov chain algorithm|LZMA]] is generally more space-efficient than bzip2 at the expense of even slower compression speed, while having faster decompression.<ref name="benchmark">{{cite web|url=http://compressionratings.com/comp.cgi?7-zip+9.12b++bzip2+1.0.5++gzip+1.3.3+-5|archive-url=https://web.archive.org/web/20160424151609/http://compressionratings.com/comp.cgi?7-zip+9.12b++bzip2+1.0.5++gzip+1.3.3+-5|archive-date=24 April 2016|title=7-zip vs bzip2 vs gzip|access-date=12 February 2019}}</ref> bzip2 compresses data in blocks of size between 100 and 900 [[Kilobyte|kB]] and uses the [[Burrows–Wheeler transform]] to convert frequently-recurring character sequences into strings of identical letters. It then applies [[move-to-front transform]] and [[Huffman coding]]. bzip2's ancestor '''bzip''' used [[arithmetic coding]] instead of Huffman. The change was made because of a [[software patent]] restriction.<ref>{{cite web|url=http://www.muraroa.demon.co.uk/ |title=The bzip2 home page |access-date=2009-03-05 |archive-url=https://web.archive.org/web/19980704181204/http://www.muraroa.demon.co.uk/ |archive-date=4 July 1998}} - section "How does it relate to your previous offering (bzip-0.21) ?"</ref> bzip3,<ref>{{Citation|last=Palaiologos|title=kspalaiologos/bzip3|date=2022-10-13|url=https://github.com/kspalaiologos/bzip3|access-date=2022-10-13}}</ref> a modern compressor that shares common ancestry and set of algorithms with bzip2, switched back to arithmetic coding. bzip2 performance is asymmetric, as decompression is relatively fast. Motivated by the long time required for compression, a modified version was created in 2003 called pbzip2 that used [[Thread (computer science)|multi-threading]] to encode the file in multiple chunks, giving almost linear speedup on multi-CPU and multi-core computers.<ref name="compressioncomparison">{{Cite web|url=http://ww1.compressionratings.com/?subid1=0a6f790c-1f87-11ea-977f-f101504fd22c|title=compressionratings.com|website=ww1.compressionratings.com}}</ref> {{As of|2010|5}}, this functionality has not been incorporated into the main project. Like [[gzip]], bzip2 is only a data compressor. It is not an archiver like [[tar (file format)|tar]] or ZIP; the bzip2 file format does not support storing the contents of multiple files in a single compressed file, and the program itself has no facilities for multiple files, encryption or archive-splitting. In the [[Unix philosophy|UNIX tradition]], archiving could be done by a separate program producing an archive which is then compressed with bzip2, and un-archiving could be done by bzip2 uncompressing the compressed archive file and a separate program decompressing it. Some archivers have built-in support for compression and decompression, so that it is not necessary to use the bzip2 program to compress or decompress the archive. [[GNU Privacy Guard|GnuPG]] also has built-in support for bzip2 compression and decompression. The <code>[[grep]]</code>-based <code>[[bzgrep]]</code> tool allows directly searching through compressed text without needing to uncompress the contents first.<ref>{{cite web |title=bzgrep command in Linux with examples |url=https://linux.die.net/man/1/bzgrep |website=die.net}}</ref>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Bzip2
(section)
Add topic