public void Write(FrostbiteHeader header) { if (header == null) { return; } Write(header.Signature); Write(header.Version); Write((Int32)0); if (header.Version == 0x01) { Write(header.XorKey); } Write(Encoding.ASCII.GetBytes(header.HexValue)); if (header.Version != 0x01) { Write(new byte[256]); } Write(new byte[34]); }
public FrostbiteHeader ReadTableOfContentsHeader() { FrostbiteHeader header = new FrostbiteHeader(); header.Signature = ReadBytes(3); header.Version = ReadByte(); ReadInt32(); if (header.Version == 0x01) { header.XorKey = ReadBytes(256); } header.HexValue = new string(ReadChars(258)); if (header.Version != 0x01) { ReadBytes(256); } ReadBytes(34); return(header); }