示例#1
0
文件: DatTable.cs 项目: wowjinxy/pkNX
        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;