Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Shirasaki

macrumors P6
May 16, 2015
16,263
11,764
It just creates an archive for a file, no matter which type that file is.
So it is lossless. Unzip, and you get the exact same file.
 

dougphd

macrumors member
Original poster
Apr 28, 2016
70
0
Would you please explain the difference between an archive for a file and a video compression? Is your answer the same if the file is being zipped, by say, google for emailing.
 

Toutou

macrumors 65816
Jan 6, 2015
1,082
1,575
Prague, Czech Republic
Zip compression needs to be lossless to be even usable. A computer program, compressed with a lossy algorithm, would never work again. A book wouldn't be readable anymore.

The thing is - to perform lossy compression on a file, the computer needs to know and understand what it's compressing. The MP3 compression algorithm knows and understands it's working with sound and performs an analysis of the sound to determine which parts can be omitted without a percieved loss of quality. The same with JPEG. The algorithm knows it's working with an image and decides (it's a pretty complex thing) which parts can be made simpler and described in a simple way to save some space.

The ZIP algorithm doesn't know anything about your file, it just sees a bunch of ones and zeroes, therefore it can't decide which parts are OK to rewrite without a percieved loss of "quality" of your file.
 

fluamsler

macrumors member
Mar 5, 2016
96
32
near Basel, Switzerland
You can imagine it a bit like that. Your File is saved binary on your storage. Let's say you have a small text document on your hard disk. The Binary code is: 00000111 11100011
So the compression program reads the file and writes the information like this: 5x0 6x1 3x0 2x1

Your file takes less storage but it is still complete available and the compression program knows exactly what's inside the container.
After unzipping your file it makes the math the other way: 5x0 --> 00000 6x1 --> 111111 3x0 --> 000 2x1 --> 11 = 00000111 11100011

I hope this helps a bit to understand the technique. :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.