Exemplo n.º 1
0
        public static GzsEntry ReadGzsEntry(Stream input)
        {
            GzsEntry gzsEntry = new GzsEntry();

            gzsEntry.Read(input);
            return(gzsEntry);
        }
Exemplo n.º 2
0
        public override void Read(Stream input)
        {
            BinaryReader reader = new BinaryReader(input, Encoding.Default, true);

            input.Seek(-4, SeekOrigin.End);
            int footerSize = reader.ReadInt32();

            input.Seek(-20, SeekOrigin.Current);
            if (footerSize != 20)
            {
                throw new Exception("Invalid gzs footer.");
            }
            GzsArchiveFooter footer = GzsArchiveFooter.ReadGzArchiveFooter(input);

            input.Seek(16 * footer.EntryBlockOffset, SeekOrigin.Begin);
            for (int i = 0; i < footer.ArchiveEntryCount; i++)
            {
                Entries.Add(GzsEntry.ReadGzsEntry(input));
            }
        }