I've noticed that many downloads are a dmg (disk image) that contains a single pkg file (installation package). Usually the pkg seems to be already compressed since the dmg doesn't reduce the file size much if any.
- MonoFramework-MDK-2.10.6_1.macos10.xamarin.x86.dmg is 119,242,061 bytes (119.2 MB on disk)
- MonoFramework-MDK-2.10.6_1.macos10.xamarin.x86.pkg is 119,979,719 bytes (120 MB on disk)
A savings of 737,658 bytes, or 0.6% of the original file size.
Is there a reason not to just distribute the pkg? Is the 0.6% compression savings that important? Or is it just the way things have always been done on the Mac?
(Yes, I realize that 737,658 bytes times all the millions of downloads that dmg gets does add up, but it just always seems annoying to have that extra steps in there to mount a dmg, run the installer and then unmount the dmg. Maybe a better question is "why doesn't Mac OS X recognize a dmg with a single pkg inside it as just a pkg and simply install it without requiring all that mounting and unmounting?")
file
lists them as "xar archive - version 1" But then there's the issue of making sure that the web server is setup to force .pkg files to download rather than display. (I expect some devs use .zip instead of .dmg for the same reason - even the worst configured web servers and browsers know to download .zip files).