private void ReadHeader() { _reader.SkipBytes(4); int cpkHeaderSize = (int)_reader.ReadInt64(); var cpkHeaderBytes = _reader.ReadBytes(cpkHeaderSize); Header = CpkTable <CpkHeader> .Parse(cpkHeaderBytes).Entries.First(); }
private void ReadToc() { _reader.SkipBytes((int)Header.TocOffset + 4 + 4 + 8); var tocBytes = _reader.ReadBytes((int)Header.TocSize); _toc = CpkTable <CpkFileEntry> .Parse(tocBytes); foreach (var entry in _toc.Entries) { entry.Archive = this; } Entries = _toc.Entries.As <IFileEntry>(); }