Ejemplo n.º 1
0
        private void ReadFileEntries()
        {
            fs.Seek(Header.FileListOffset, SeekOrigin.Begin);
            FileEntries = new List <PFFFileEntry>();
            entryLookup = new Dictionary <string, PFFFileEntry>();

            for (int i = 0; i < Header.FileCount; i++)
            {
                PFFFileEntry entry = new PFFFileEntry();
                entry.Deleted      = r.ReadInt32();
                entry.FileLocation = r.ReadInt32();
                entry.FileSize     = r.ReadInt32();
                entry.PackedDate   = r.ReadInt32();
                entry.FileName     = r.ReadNullTermString(0x10);
                if (Header.Version >= PFFVersion.PFF3)
                {
                    entry.ModifiedDate = r.ReadInt32();
                }
                if (Header.Version >= PFFVersion.PFF4)
                {
                    entry.CompressionLevel = r.ReadInt32();
                }
                FileEntries.Add(entry);
                if (entry.Deleted == 0)
                {
                    entryLookup[entry.FileName] = entry;
                }
            }
        }
Ejemplo n.º 2
0
        private void ReadFileEntries()
        {
            fs.Seek(Header.FileListOffset, SeekOrigin.Begin);
            FileEntries = new List<PFFFileEntry>();
            entryLookup = new Dictionary<string, PFFFileEntry>();

            for (int i = 0; i < Header.FileCount; i++)
            {
                PFFFileEntry entry = new PFFFileEntry();
                entry.Deleted = r.ReadInt32();
                entry.FileLocation = r.ReadInt32();
                entry.FileSize = r.ReadInt32();
                entry.PackedDate = r.ReadInt32();
                entry.FileName = r.ReadNullTermString(0x10);
                if (Header.Version >= PFFVersion.PFF3)
                {
                    entry.ModifiedDate = r.ReadInt32();
                }
                if (Header.Version >= PFFVersion.PFF4)
                {
                    entry.CompressionLevel = r.ReadInt32();
                }
                FileEntries.Add(entry);
                if (entry.Deleted == 0)
                {
                    entryLookup[entry.FileName] = entry;
                }
            }
        }