ibopk.blogg.se

What does compressing files do on mac
What does compressing files do on mac






what does compressing files do on mac

If the compression program scanned Kennedy's phrase, the first redundancy it would come across would be only a couple of letters long. And, as we'll see in the next section, it would also be rewriting the dictionary to get the most efficient organization possible. This gives us a file size of 74, so we haven't reduced the file size by very much.īut this is only one sentence! You can imagine that if the compression program worked through the rest of Kennedy's speech, it would find these words and others repeated many more times.

what does compressing files do on mac

Our compressed sentence (including spaces) takes up 37 units, and the dictionary (words and numbers) also takes up 37 units. We already saw that the full phrase takes up 79 units.

what does compressing files do on mac

In an actual compression scheme, figuring out the various file requirements would be fairly complicated but for our purposes, let's go back to the idea that every character and every space takes up one unit of memory. It automatically reconstructs the original file once it's downloaded.īut how much space have we actually saved with this system? "1 not 2 3 4 5 6 7 8 - 1 2 8 5 6 7 3 4" is certainly shorter than "Ask not what your country can do for you ask what you can do for your country " but keep in mind that we need to save the dictionary itself along with the file. To create this sort of file, the programmer includes a simple expansion program with the compressed file. You might also have encountered compressed files that open themselves up. This is what the expansion program on your computer does when it expands a downloaded file. If you knew the system, you could easily reconstruct the original phrase using only this dictionary and number pattern.








What does compressing files do on mac