Пример #1
0
        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);
                }
            }
        }
Пример #2
0
 public bool Equals(DatEntry d) => d.Hash == Hash;