using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace PFCRip { public class PFCHeader : PFCObject { #region Declarations protected override byte[] SyncHeader { get { return new byte[] { (byte)'R', (byte)'S', 0x01, 0x00 }; } } private PFCEntry[] _entries; #endregion #region Constructors / Teardown public PFCHeader(byte[] data, uint startIndex) : base(data, startIndex) { //Extract the list of records uint count = LittleEndianConverter.ToUInt32(Data, 0); _entries = new PFCEntry[count]; for (uint i = 1; i < count; i++) { uint offset = LittleEndianConverter.ToUInt32(Data, i * 4 + 4); if (offset > 0) _entries[i] = new PFCEntry(data, offset); } } #endregion #region Public Properties public PFCEntry[] Entries { get { return _entries; } } #endregion } }