Difference Between ZIP and GZIP
ZIP vs GZIP
ZIP and GZIP are two very popular methods of compressing files, in order to save space, or to reduce the amount of time needed to transmit the files across the network, or internet. In general, GZIP is much better compared to ZIP, in terms of compression, especially when compressing a huge number of files.
Software that use the ZIP format are capable of both archiving and compressing the files together. These are two separate processes. Compression reduces the size of the file with the use of algorithms, while archiving combines multiple files, so that the output is a single file. GZIP is purely a compression tool, and relies on another tool, commonly TAR, to archive the files.
It might seem like a minor thing, but it can affect the experience of the user in certain instances. The common practice with GZIP, is to archive all the files into a single tarball before compression. In ZIP files, the individual files are compressed and then added to the archive. When you want to pull a single file from a ZIP, it is simply extracted, then decompressed. With GZIP, the whole file needs to be decompressed before you can extract the file you want from the archive. When pulling a 1MB file from a 10GB archive, it is quite clear that it would take a lot longer in GZIP, than in ZIP.
GZIP’s disadvantage in how it operates, is also responsible for GZIP’s advantage. Since the compression algorithm in GZIP compresses one large file instead of multiple smaller ones, it can take advantage of the redundancy in the files to reduce the file size even further. If you archive and compress 10 identical files with ZIP and GZIP, the ZIP file would be over 10 times bigger than the resulting GZIP file.
Although both can be used with almost any operating system, each is popular in certain systems. ZIP is very popular with the Windows operating system, and has even been incorporated into the features of the OS itself. GZIP has a large following in the UNIX-like operating systems, such as the many Linux distributions.
Summary:
1. GZIP can achieve better compression compared to ZIP.
2. ZIP is capable of archiving and compressing multiple files, while GZIP is only capable of compression.
3. You can easily extract individual files from a large ZIP file, but not from a GZIP tarball.
4. ZIP is fairly popular on Windows, while GZIP is more popular on UNIX-like operating systems.
- Difference Between Sony Cybershot S Series and W Series - December 22, 2012
- Difference Between Samsung Galaxy S3 and iPhone 5 - December 21, 2012
- Difference Between Samsung Galaxy S2 (Galaxy S II) and Galaxy S 4G - December 20, 2012
Search DifferenceBetween.net :
Email This Post : If you like this article or our site. Please spread the word. Share it with your friends/family.
a very nice summary!
Nice post. Thanks !
I don’t think #3 is quite accurate. In the unix environment it is common practice to extract single files from a tar.gz file.
Example:
Say you have an archived and compressed file:
Archived.tar.gz and it contains a bunch of files one of which is called File.txt.
To extract it one simply uses the command:
tar -zxvf Archived.tar.gz File.txt
Or if you have a modern desktop environment such as kubuntu/ubuntu, you would simply:
Right click over the file and select “Open” (which just views what’s inside and not actually extracts anything).
Click on the file you want to extract and press the extract button.
Thank you, it’s help me!
Very useful post. Thankyou
I have a problem with this statement: “If you archive and compress 10 identical files with ZIP and GZIP, the ZIP file would be over 10 times bigger than the resulting GZIP file.” This is misleading. What’s the likelyhood that you will be compressing 10 or some quantity of identical files? Average compression achieved is dependent upon the type of data being archived. There are other comparisons on the web that make it clear, that there is no clear winner between zip and gzip for most uses.
Thank you for an excellent and precise comparison between zip and gzip. We are currently adding zip and unzip (gzip and gunzip) functionality to some file downloads in our website http://thulya.com and had a question in mind whether zip or gzip/tar is efficient. Your post has given a detailed overview of what we were looking for.
thanks good info!
Very well explained.Thank you!
gzip replaces the original file while zip doesn’t replace the original file by default.