Ejemplo n.º 1
0
        public Record(byte[] rawData)
        {
            RawData = rawData;
            var reader = new ByteReader();

            Name               = reader.ReadBytes <string>(RawData, TES4_RECORD_NAME_SIZE);
            Size               = reader.ReadBytes <int>(RawData);
            Flag               = reader.ReadFlagBytes <RecordFlag>(RawData);
            FormId             = reader.ReadFormId(RawData);
            VersionControlInfo = reader.ReadBytes <int>(RawData);
            Data               = reader.ReadBytes <byte[]>(RawData, Size);

            if (Flag.Contains(RecordFlag.Compressed))
            {
                DecompressData(Data);
            }
        }