示例#1
0
        private void Parse(string fileName)
        {
            FileStream   = new FileStream(fileName, FileMode.Open);
            BinaryReader = new BinaryReader(FileStream);

            Header = GlbHeader.Read(BinaryReader);
            for (var i = 0; i < Header.FileCount; i++)
            {
                FileTable.Add(ArchFile.Read(BinaryReader));
            }
        }
示例#2
0
        public static ArchFile Read(BinaryReader binaryReader)
        {
            var archFile = new ArchFile
            {
                Flags    = binaryReader.ReadInt32(),
                Offset   = binaryReader.ReadInt32(),
                Length   = binaryReader.ReadInt32(),
                FileName = Encoding.UTF8.GetString(binaryReader.ReadBytes(16)).Replace("\0", "")
            };

            return(archFile);
        }