Documentation ¶
Index ¶
Constants ¶
View Source
const ( NONE_TYPE udifChecksumType = 0 CRC32_TYPE udifChecksumType = 2 )
View Source
const ( Flattened udifResourceFileFlag = 0x00000001 InternetEnabled udifResourceFileFlag = 0x00000004 )
View Source
const ( ZERO_FILL udifBlockChunkType = 0x00000000 UNCOMPRESSED udifBlockChunkType = 0x00000001 IGNORED udifBlockChunkType = 0x00000002 // Sparse (used for Apple_Free) COMPRESS_ADC udifBlockChunkType = 0x80000004 COMPRESS_ZLIB udifBlockChunkType = 0x80000005 COMPRESSS_BZ2 udifBlockChunkType = 0x80000006 COMPRESSS_LZFSE udifBlockChunkType = 0x80000007 COMPRESSS_LZMA udifBlockChunkType = 0x80000008 COMMENT udifBlockChunkType = 0x7ffffffe LAST_BLOCK udifBlockChunkType = 0xffffffff )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DMG ¶
type DMG struct { Plist resourceFork Nsiz nsiz Blocks []UDIFBlockData // contains filtered or unexported fields }
DMG apple disk image object
func NewDMG ¶
NewDMG creates a new DMG for accessing a dmg in an underlying reader. The dmg is expected to start at position 0 in the ReaderAt.
func (*DMG) Close ¶
Close closes the DMG. If the DMG was created using NewFile directly instead of Open, Close has no effect.
func (*DMG) GetBlock ¶
func (d *DMG) GetBlock(name string) (*UDIFBlockData, error)
GetBlock returns the size of the DMG data
type UDIFBlockData ¶
type UDIFBlockData struct { Name string Chunks []udifBlockChunk // contains filtered or unexported fields }
UDIFBlockData object
func (*UDIFBlockData) DecompressChunks ¶
func (b *UDIFBlockData) DecompressChunks(w *bufio.Writer) error
DecompressChunks decompresses the chunks for a given block and writes them to supplied bufio.Writer
type UDIFChecksum ¶
UDIFChecksum object
type UDIFResourceFile ¶
type UDIFResourceFile struct { Signature udifSignature // magic 'koly' Version uint32 // 4 (as of 2013) HeaderSize uint32 // sizeof(this) = 512 (as of 2013) Flags udifResourceFileFlag RunningDataForkOffset uint64 DataForkOffset uint64 // usually 0, beginning of file DataForkLength uint64 RsrcForkOffset uint64 // resource fork offset and length RsrcForkLength uint64 SegmentNumber uint32 // Usually 1, can be 0 SegmentCount uint32 // Usually 1, can be 0 SegmentID types.UUID DataChecksum UDIFChecksum PlistOffset uint64 // Offset and length of the blkx plist. PlistLength uint64 Reserved1 [64]byte CodeSignatureOffset uint64 CodeSignatureLength uint64 Reserved2 [40]byte MasterChecksum UDIFChecksum ImageVariant uint32 // Unknown, commonly 1 SectorCount uint64 Reserved3 uint32 Reserved4 uint32 Reserved5 uint32 }
UDIFResourceFile - Universal Disk Image Format (UDIF)
Click to show internal directories.
Click to hide internal directories.