public DatTable(byte[] data) { using var ms = new MemoryStream(data); using var br = new BinaryReader(ms); var count = br.ReadInt32(); Entries = new DatEntry[count]; for (int i = 0; i < Entries.Length; i++) { var e = new DatEntry(br); Entries[i] = e; if (!ContainsKey(e.Hash)) { Add(e.Hash, e.Value); } } }
public bool Equals(DatEntry d) => d.Hash == Hash;