parse

fun parse(bytes: ByteArray, offset: Int): MachoHeader(source)

Parses a Mach-O header from a byte array.

Return

A MachoHeader instance based on the magic number

Parameters

bytes

The byte array containing the Mach-O header

offset

The offset within the byte array at which the header starts

Throws

if the magic number is not recognized