using System.Runtime.InteropServices; namespace BinaryObjectScanner.Models.MoPaQ { /// /// Hash table is used for searching files by name. The file name is converted to /// two 32-bit hash values, which are then used for searching in the table. The size /// of the hash table must always be a power of two. Each entry in the hash table /// also contains file locale and offset into block table. Size of one entry of hash /// table is 16 bytes. /// /// [StructLayout(LayoutKind.Sequential)] public sealed class HashEntry { /// /// The hash of the full file name (part A) /// public uint NameHashPartA; /// /// The hash of the full file name (part B) /// public uint NameHashPartB; /// /// The language of the file. This is a Windows LANGID data type, and uses the same values. /// 0 indicates the default language (American English), or that the file is language-neutral. /// public Locale Locale; /// /// The platform the file is used for. 0 indicates the default platform. /// No other values have been observed. /// public ushort Platform; /// /// If the hash table entry is valid, this is the index into the block table of the file. /// Otherwise, one of the following two values: /// - FFFFFFFFh: Hash table entry is empty, and has always been empty. /// Terminates searches for a given file. /// - FFFFFFFEh: Hash table entry is empty, but was valid at some point (a deleted file). /// Does not terminate searches for a given file. /// public uint BlockIndex; } }