7 char magic[8]; // "\0plocate";
8 uint32_t version; // 0.
9 uint32_t hashtable_size;
10 uint32_t extra_ht_slots;
12 uint64_t hash_table_offset_bytes;
13 uint64_t filename_index_offset_bytes;
21 bool operator==(const Trigram &other) const
23 return trgm == other.trgm;
25 bool operator<(const Trigram &other) const
27 return trgm < other.trgm;
31 inline uint32_t hash_trigram(uint32_t trgm, uint32_t ht_size)
33 // CRC-like computation.
35 for (int i = 0; i < 32; i++) {
36 bool bit = crc & 0x80000000;
45 #endif // !defined(DB_H)