public void Read(ErpBinaryReader reader) { reader.ReadBytes(4); // entry info length this.FileName = reader.ReadString(reader.ReadInt16()); this.EntryType = reader.ReadString(16); this.Unknown = reader.ReadInt32(); byte numResources = reader.ReadByte(); while (numResources-- > 0) { ErpResource res = new ErpResource(this.ParentFile); res.Read(reader); this.Resources.Add(res); } if (this.ParentFile.Version > 2) { this.Hash = reader.ReadBytes(16); } }
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 = reader.ReadByte(); this.PackedSize = reader.ReadUInt64(); } else { this.PackedSize = this.Size; } }