Why are MP3 files not noticeably compressed by the compression tools within Lion?

I clicked the 'Compress xxx' option in the popup menu in order to compress a folder of MP3 files, but the result was a .zip file that is almost the same size as before compressing; it seemed to only archive those files.

How can I archive them and reduce their size greatly?

Is there any free app that can do so?


As patrix mentioned in the comments, certain types of data (such as MP3, JPEG, MPEG) are not able to be compressed further because they are already compressed.

Compressing a bunch of MP3 files is not going to do much apart from bundling them together in one archive.


As others have pointed out: MP3 data is already data that's been compressed. It's compressed using an algorithm that takes in to account audio data, stripping out the audio data that the algorithm believes to be beyond perception to the average human being. It's a different approach than compression used in tools like zip and rar, but it the end result is mostly the same: you have less data in the file and what you have is less regular, less repeating.

Which brings us to how some of these long running compression algorithms work. In the case of the zip format it's generally based on DEFLATE (though not always, but that's the most popular compression approach), a method for reducing the data size in a file that relies on finding repeated data blocks and replacing them with a much shorter blocks that can be used to look up the longer block in a common dictionary. That's a bit of a naïve explanation, but should suffice to give you enough understanding to figure out what's going on here.

When you combine those two facts: that your MP3 data has already been unique-ified by an audio compression algorithm, and that zip compression is looking for commonalities to put in to a dictionary to reduce the file size, you can see why compression an MP3 file doesn't get you much. There isn't much there the algorithm can work with, so the file sizes stay about the same.

That doesn't mean you can't build archives out of MP3 files, it just means you have to be smarter about archiving.

Bundling together multiple MP3 files and compressing them en masse is a good strategy for eeking out a little more space saving. By first turning multiple files in to one, larger file, and compressing that larger file, the compression algorithm can look for similarities across all the files. There's a higher probability similarities will be found in this case.

There are a few ways you can bundle and compress your data:

  1. From Finder, compress an entire folder or tree of folders instead of one file at a time;
  2. Pre-bundle things using a tool like tar to build a single archive file out of multiple files on disk and than compress the tar file (tar even has built-in gzip compression it can apply to the bundle when you create it so it's one command line call);
  3. Try other compression tools that use different algorithms and attempt to be more "multi-file aware", something like RAR or bzip2 or KGB

… How can i … reduce their size greatly? …

For files with content that is not naturally compressed, there are at least two products that can compress without archiving.

Neither is free but both should be of interest.

Keyword: AppleFSCompression, also known as HFS Plus Compression.

Clusters

…  takes advantage of the file compression technology in Mountain Lion, Lion and Snow Leopard …

MoreSpace Folder Compression

… HFS+ compression has the best effect on uncompressed file formats like text and data documents, databases and mailboxes. A typical Mail mailbox size can be reduced up to 50%. …

Preference

Of those two, I find Clusters more mature and easier to use.


Proceed with caution

In an edge case, silent dataloss may occur with third party uses of AppleFSCompression. From what I can tell this is a bug in the OS, and may occur only where there's an extraordinary lack of free space. I'll feed the bug to Apple.