public void Read(ErpBinaryReader reader) { this.Name = reader.ReadString(4); this.Offset = reader.ReadUInt64(); this.Size = reader.ReadUInt64(); this.Flags = reader.ReadInt32(); if (this.ParentFile.Version > 2) { this.Compression = (ErpCompressionAlgorithm)reader.ReadByte(); this.PackedSize = reader.ReadUInt64(); } else { this.PackedSize = this.Size; } int pos = (int)reader.BaseStream.Position; reader.Seek((int)(this.ParentFile.ResourceOffset + this.Offset), SeekOrigin.Begin); this._data = reader.ReadBytes((int)this.PackedSize); reader.Seek(pos, SeekOrigin.Begin); }
public ErpFragment() { this.Name = "temp"; this.Flags = 16; this.Compression = ErpCompressionAlgorithm.Zlib; }