Documentation
¶
Overview ¶
Package dmg opens Apple UDIF disk images (.dmg) as a read-only virtual disk.
A UDIF file ends with a 512-byte "koly" trailer that points at an XML property list describing the image layout. Each "blkx" entry in that list carries one "mish" block table: a list of chunks, each mapping a sector range of the virtual disk to a byte range in the data fork, compressed with zlib, bzip2, LZFSE, LZMA or Apple's ADC, or stored raw or zero-filled.
Disk implements io.ReaderAt over that virtual disk; the filesystem probes and partition-table parsing then see it exactly like a raw image.
Index ¶
Constants ¶
const Sector = 512
Sector is the UDIF sector size: chunk tables count 512-byte sectors.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Disk ¶
type Disk struct {
// contains filtered or unexported fields
}
Disk is an opened UDIF image: a read-only view of its virtual disk. It implements io.ReaderAt and is safe for concurrent use.
func Open ¶
Open reads the trailer, property list and block tables of the UDIF image in ra (whose file length is size) and returns its virtual disk.