
As other references to this trailer call it the "koly" block, we can do the same. This trailer is identifiable by a magic 32-bit value, 0圆B6F6C79, which is "koly" in ASCII. The common denominator of most of these is the existence of a 512-byte trailer at the end of the file. DMGs come in a variety of sub-formats, corresponding to the different tools which create them, and their compression schemes.

The first noteable fact about the DMG file format is, that there is no DMG file format. When set to verbose mode, HFSleuth also provides step by step information as it processes DMGs, and is used in the examples below.
#IDMG FILE TYPE PORTABLE#
HFSleuth can operate fully on all known DMG types (to date), and can serve as a complementary tool to Apple's hdiutil(1), or - as it is POSIX portable - even as a replacement for it, on non OS X systems. The DMG file format has been painstakingly reverse-engineered by several, and this article/addendum aims to consolidate their hard work into a single document. This article, therefore, is an attempt to rectify that shortcoming.

I briefly mention DMGs (pages 589-590), but due to the page constraints of an already large book, I had failed to delve into their format sufficiently. I realized, however, that the DMG file format (being Apple proprietary) was woefully undocumented. AboutĪs part of writing HFSleuth, a "bonus" tool for my book, I decided to implement DMG (disk image support).

DeMystifyinG the DMG file format Demystifying the DMG File Format Jonathan Levin, - 6/12/13 1.
