Why are zip files used to download digital files?
Bendinggrass
Posts: 1,371
in The Commons
I recently downloaded a few files from various sources, and this is nothing new. But I am now wondering why these files are downloaded in "zip" file format.
Is it to simply keep a number of related files together in one package for transport? I noticed the size difference between these zip and uncompressed files is small.
The same thing is done when downloading music files, they are always compressed and the uncompressed version is not really much bigger. I can understand zipping a picture, but I can't really see the use of doing this with music or a daz file.
Thanks.
Comments
Zip is fairly inefficient to reduce the size of downloads, to be honest. But, as you said, the main reason to use the format is to keep all of the files in a generally organized layout.
Thanks.
What are the other more efficient ways to compress files?
How much the size is reduced by zipping files depends a lot on the content. With most 3D content it's usually not much because the heaviest files, like textures, generally already are in compressed formats (mainly jpg, png). Same with the most common audio and video file formats today like MP3 and MP4. But with other files like text files or software the size can be reduced quite a lot. As for compression and download speed it depends, there are some discussions about it here:
https://www.quora.com/Does-a-compressed-file-transfer-faster-than-its-uncompressed-components?share=1
Zip files also have CRC32 checksum validation, which guarantees that all the files they contain are OK (or at least in the same state as when they were zipped), if they unpack without error messages. With unzipped files you can't be certain about their state as they theoretically may become corrupted at any point during transfer. Not so much a problem these days where hardware and networks generally are very reliable, but corrupted files were fairly common in the earlier days of the internet.
Thanks, Toaz.
Interesting. I will read up on this more.
Randy
Also the files that compress well like txt usually contribute very little to the total size of the product.
For me, it's about combing multiple files into one, easy to handle file. I don't really care about it being compressed, that's a sort of bonus. I always use rar files though, not zips, for no other reason than having WinRar but there's not much difference between the two formats.
For me, zipping a single picture is pointless but for multiple pictures it's great. How often do you download a Daz file, as in a single Daz file?
It's got to be rare as it's usually multiple files (sometimes hundreds or thousands), organised into multiple folders. A zip or rar simply keeps all of that together, in one easily manageable file.
It'sall about the information contained in the files. Lossless compression like zip works by looking for patterns in the file's content and replacing it with a description of the pattern. To take a simple example, if you had an image with 1000 blue pixels in a row, rather than saying blue pixel 1000 times you could just say 1000 blue pixels, The way it actually works is a more complicated than this, I don't kow how it does it, I just know it does.
When a file is compressed it doesn't have these patterns anymore so sending it to another compressor doesn't do much good. Zip can usually compress text files very well but most image files are already compressed. It might find a few tricks the image comressor didn't use but it probably won't ake much difference,
Zip and other compressors used for computer files use lossless compression which means when you uncompress the file you get back exactly what you started with. Jpeg, mp3 and similar formats use lossy compression and you can't get the exact original back. Jpeg is designed around the way human vision works so the compressed image looks the same, mp3 is designed around human hearing so you can't hear the difference in the sound.
This is why.