Zip, bzip, gzip, or 7zip?

Submitted by peter on Fri, 12/22/2017 - 05:33

Zip, bzip, gzip, or 7zip? Zip is the world's most common compression program/format through a long history of use in Windows. Gzip was an alternative in the Linux/Unix operating systems. Bzip and 7zip are improvements for compressing some types of files. Which is the best?


The Zip file format and compression software dates from 1989. You can compress a file or multiple files or directories full of files. The compression is lossless which means the uncompressed version will be identical to the original.

Microsoft included Zip in Windows way back in 1998, locking the Zip format into history. Apple caught up five years later. Many free open source Web sites offer the Zip format for file downloads with some sites offering only the Zip format.

Zip lets you use any one of several compression techniques with the "DEFLATE" technique the most common because DEFLATE had a good tradeoff between between compression speed and size reduction when used in the old processors common back in the 1990s.

You can use Zip when the file is small and you want to offer only one download.


Gzip dates from 1992 and is a free open source alternative to Zip using the same DEFLATE technique. DEFLATE has no patents to restrict use.

A Gzip file compression is about the same size as a typical Zip compression of the same file. If they are different, it is because the Zip software used non standard settings.

Gzip compresses only one file. Multiple compressed files are then put in one archive file using the "tar" file format. A group of files in directory "example" are grouped together in a tar file called "example.tar" and the Tar file is compressed to "example.tar.gz".

Gzip is used for pure text files and is replaced by Bzip when there are binary files in the mixture.


Zip and Gzip are good for compressing text but not for compressing binary files. A compressed binary file might be larger than the uncompressed version. Zip and Gzip are bad choices for placing multiple images in one big archive.

Bzip2 was released in 1996 with better compression of some binary files. Bzip2 was slow at compressing files and did not catch on until processors caught up with the heavy Bzip2 workload. Files have the ".bz2" file extension. Most downloads containing a mixture of text and binary files are now offered in the Bzip2 format instead of the Gzip format.

Bzip2 is almost always called Bzip. Bzip is usually better than Zip and Gzip.


7zip dates from 1999, is formally named 7-Zip, and uses the .7z file extension. 7Zip produces smaller files than Zip and Gzip. For most uses, 7zip produces smaller files than Bzip.

Internally the 7zip format is an archive format similar to Zip with each included file compressed via a compression technique appropriate to the file. Bzip is one of the techniques used on individual files. LZMA is a new technique introduced by 7zip and helps 7zip compress some types of data better than anything else.

Some free open source sites are offering downloads in the 7zip format to cut down on the data downloaded. They use a small amount of extra processing time during compression and save a small amount on every download. Given that there may be tens of thousands of downloads for every compression, the sites save far more time during downloads than what is lost during compression.

7Zip is almost old enough to offer as an alternative to Zip and Gzip. Offer 7zip as the main file and a Zip file as the alternative.


Modern free open compression software can decompress all Zip and related files. Many of the patents restricting compression techniques apply only to compression, not to decompression. There is no restriction on what you can offer. For a large file, offer the format with the most compressions and Zip as a "work anywhere" alternative.