You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

what does it mean to compress a file?

does it mean it will take up less room on my disk and is there anything bad that can happen by compressing a file?

MacBook Pro, Mac OS X (10.7.2)

Posted on Mar 16, 2012 9:24 PM

Reply
6 replies

Mar 16, 2012 9:30 PM in response to jaimiem

It takes up less space. It takes a bit more time to use because you have to uncompress it before using it again and then compress it again afterwards if that's how you wish to store it.


Most compressed file formats can make a file totally unusable if the compressed file becomes corrupt.


Some formats such as some picture formats and some music formats are already compressed and compressing them further will do nothing or might even make them a bit larger because of the overhead.


If you have questions about specific files or usage them let us know.

Mar 16, 2012 9:32 PM in response to jaimiem

Compression means *reversibly* changing the way the bytes of a file are represented so that they take up less space.


*Reversibly* means it can be un-compressed again later.


One of the most common algorithms is counting how often each charcter is used in a file (like a text file) and finding a way to store the most-common characters using fewer than 8 bits. This method compresses text files considerably (given that text documents are letters and numbers mostly, and only 62 of those cover upper/lower and digits).


But another purpose for "compressing" is not so much to change the file size, but to compress (scramble the characters reversibly) and put a password-encryption on the file to allow your private data to be sent over public paths, and the password is needed to uncompress.


Yes,compressing *can* save space. But how much space it will save is not easily predicted.

Mar 16, 2012 9:44 PM in response to jaimiem

If you want to see a simple example of how compression works, in the finder, control (right) click on a folder of stuff (preferably text files for a more dramatic effect) or something else of your choice. In the resulting contextual menu you will see Compress. Select it and it will compress what you selected generating a zip file (one form of compression). If what you selected was named X the zip file will be X.zip. X is not touched.


Move the zip file to some place else and double click it in the finder. The compressed zip file will be decompressed and produce a copy of the original selection.


Also in the finder do Get Info's on both the original and the zip file to compare the sizes.


Zip is only one such form of compression. For example there's gzip, bzip2, sit, sitx, rar, and others.

Mar 16, 2012 9:56 PM in response to jaimiem

jaimiem wrote:


what does it mean to compress a file?

You're talking about lossless compression. See


<http://en.wikipedia.org/wiki/Data_compression#Lossless>

does it mean it will take up less room on my disk

It depends on the file.


An MP3 or JPEG file contains data which has already been subjected to lossy compression. Consequently, compressing such a file will save very little space on the disk. This saving usually comes from compressing metadata (such as MP3 tags or EXIF tags), which don't take much space to begin with. Under certain circumstances, such a compressed file may even be bigger than the original.


By contrast, text files can take considerable compression. An example is the MS Word .docx format. A .docx file is actually a (compressed) zip archive containing a hierarchy of mostly marked-up text files. Such an archive, when expanded, can take 10 times as much space.

is there anything bad that can happen by compressing a file?

"Anything" is rather a large word. The two chief issues you have to be aware of are password protection and compatibility. If the compressed file is password-protected and you lose the password, you may never again gain access to it. If a compression format becomes obsolete, you may no longer find the software able to expand the archive.

what does it mean to compress a file?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.