There is no real 'Compression' as such done, its just sector/file optimization. Repeated files/bits are marked and mapped to the CD index database, instead of physically writing them. When your drive copies those files, it just looks up the index and produces / repeats the sectors/bits/files as and when needed.
Of course this would only be applicable only for those CDs that contain a lot of files, for eg, CDs that contain many windows installations in a single disk, multi-boot cds, etc. And yes, it wouldn't work for audio/video CDs or CDs containg a single large file, etc
A few programs such as UltraIso and makeiso.exe support filesystem optimizations.