Пример #1
0
        public byte[] GetRawData(BetterBinaryReader reader)
        {
            reader.Seek(_offset, SeekOrigin.Begin);

            if (_skipNames)
            {
                reader.Position += 2;
            }

            if (_compressed)
            {
                var size   = reader.ReadUInt32();
                var b      = new byte[_size - 4];
                var output = new byte[size];

                reader.Read(b, 0, (int)_size - 4);
                // Uncompress

                return(output);
            }

            return(reader.ReadBytes((int)_size));
        }
Пример #2
0
 public BSARecord(BetterBinaryReader reader)
 {
     Hash   = reader.ReadUInt64();
     Count  = reader.ReadInt32();
     Offset = reader.ReadInt32();
 }
Пример #3
0
 public BSAArchive(string filename)
 {
     _files  = new Dictionary <ulong, BSAFileInfo>();
     _reader = new BetterBinaryReader(File.OpenRead(filename));
 }