ECM: A Free Optical Disc Image Compression Tool

Creating an optical disc image is the process of making an exact copy of the contents of a disc. If you just copy and paste the content of some discs such as of a bootable CD/DVD, using your file manager then it will loose some of its important data and if you burn it to a disc later hoping that it will boot as the original disc, well, it won’t.

So the solution is to create disc image of that disc and then burn it. And there are many types of disc image formats one can use but depending on the need you should choose the proper image format otherwise it can still fail you. For example, the widely used ISO (.iso) format sometimes struggles while creating a proper image of an audio CD.

And because each disc image format is different the disc image ends up in different sizes too (for the same disc). Take the “.cue/.bin”) format. It adds additional data while creating the disc image thus the output file is a bit bigger when comparing with the original disc’s size.

ECM in action (under Ubuntu …)

And also some disc images add data recovery info to the output file (error correction data) again making it a bit bigger than the source file. So in simple terms, to backup 10 discs with each containing 700MB using the “.iso” format would take about 7000MB of your HDD space.

But if you want to have a “full” copy of those discs (say that they’re audio CDs) then if you go with the “.BIN” format for instance, then you’ll need an additional space of 700-800 MB as it copies other data that is not shown in the file manager.

Did you know that there is a way to compress these disc images (without losing any data) so you can save some HDD space?

There are many tools that you can use but if you are okay with using a command-line based tool then try ‘ECM’. And depending on the disc image format ECM can reduce the size dramatically (unlike with other data compression this is extremely fast too).

Few main features …

*. It an open source tool that runs in GNU/Linux, Windows and Mac OS X.

*. It achieves the size reduction by removing those error correction data from your disc images. But as said, this is 100% reversible.

*. Supports a lot of popular disc image formats such as: ISO, NRG, BIN/CUE, CDI, CCD or any format that uses the Raw sector copying.

*. Has two built in tools for compressing and decompressing.

You can install ECM in Ubuntu 12.04 Precise Pangolin, 11.10 Oneiric Ocelot, 11.04 Natty Narwhal, 10.10 and 10.04 by using the below command in your Terminal window.

sudo apt-get install ecm

Other OS users, please visit this ECM home page for more information (has an excellent “how it works?” page).

How to use it ?

Quite simple actually. Let’s say that you’ve already created a disc image using something like Nero, CDW or whatever the tool that you use.

Let’s also assume that I have created a “.BIN” file called “Ubuntu-11.10-i386.bin” that has a size of 837MB, roughly. Again, the default 11.10 ISO image is much smaller yet the “.BIN” creates an exact sector by sector RAW copy which is the reason for the size increase.

To compress this disc image using ECW I’ll use the below command.

ecm Ubuntu-11.10-i386.bin


This should automatically convert the disc image and the output file will have the original name plus the “.ecm” extension attached to it (“Ubuntu-11.10-i386.bin.ecm” in this instance). The output size was roughly about 729-730MB. So ECM has reduced about 107MB!.

How to get the original file back?

Now, “.ecm” format is not supported by most disc burning tools. And you’ll have to generate the original file before you can burn it into a disc. In that case, you can use the “unecm” command for generating the original file.

As for the above file, I’d use something like the below one in my Terminal window.

unecm Ubuntu-11.10-i386.bin.ecm

Just replace “Ubuntu-11.10-i386.bin.ecm” with your compressed disc image created using “ECM”. If everything goes smoothly, you should see a window similar to the below and you should have a lossless exact copy of the original disc image!.


I tried this with an ISO disc image and the output size reduction wasn’t as impressive as with “.BIN” file. This is again due to the nature of the BIN disc images. So please remember, depending on your disc image format, the output file size difference may not always be that “impressive”. But ‘ECM’ is certainly a handy tool ;-).

An RHCE, 'Linux' user with 14+ years of experience. Extreme lover of Linux and FOSS. He is passionate to test every Linux distribution & compare with the previous release to write in-depth articles to help the FOSS community.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.