`

zip gzip

    博客分类:
  • java
阅读更多

http://www.differencebetween.net/technology/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 theUNIX-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



Read more: Difference Between ZIP and GZIP | Difference Between | ZIP vs GZIP http://www.differencebetween.net/technology/difference-between-zip-and-gzip/#ixzz38q4eTI5J 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics