public UniversalBinaryFile(byte[] buffer) { Header = new FatHeader(buffer); List <FatArch> architectures = new List <FatArch>(); for (int index = 0; index < Header.NumberOfArchitectures; index++) { FatArch architecture = new FatArch(buffer, FatHeader.Length + index * FatArch.Length); architectures.Add(architecture); } foreach (FatArch architecture in architectures) { MachObjectFile machObject = new MachObjectFile(buffer, (int)architecture.Offset, (int)architecture.Size); Architectures.Add(architecture, machObject); } }
public UniversalBinaryFile() { Header = new FatHeader(); }
public static bool IsUniversalBinaryFile(byte[] buffer) { return(FatHeader.IsFatHeader(buffer)); }