Example #1
0
        public void Read()
        {
            using (var ms = new MemoryStream(_file.DecompressedBytes))
                using (var br = new BinaryReader(ms))
                {
                    ReadHeaderData(br);

                    br.AdvanceToValue(_userMarker);
                    _fileDataOffset = br.BaseStream.Position;
                    ReadUserData(br);

                    br.AdvanceToValue(_fileDataMarker);
                    _fileDataOffset = br.BaseStream.Position;
                    ReadFileData(br);

                    br.AdvanceToValue(_characterMarker);
                    _characterOffset = br.BaseStream.Position;
                    ReadCharacters(br);

                    br.AdvanceToValue(_myCastleMarker);
                    _myCastleOffset = br.BaseStream.Position;
                    ReadMyCastle(br);
                }
        }