예제 #1
0
        private void ReadHeader()
        {
            _reader.SkipBytes(4);
            int cpkHeaderSize  = (int)_reader.ReadInt64();
            var cpkHeaderBytes = _reader.ReadBytes(cpkHeaderSize);

            Header = CpkTable <CpkHeader> .Parse(cpkHeaderBytes).Entries.First();
        }
예제 #2
0
        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>();
        }