MCPcopy Create free account
hub / github.com/google/snappy / TableEntry8ByteMatch

Function TableEntry8ByteMatch

snappy.cc:187–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185}
186
187inline uint16_t* TableEntry8ByteMatch(uint16_t* table, uint64_t bytes,
188 uint32_t mask) {
189 constexpr uint64_t kMagic = 58295818150454627ULL;
190 const uint32_t hash = (kMagic * bytes) >> (64 - kMaxHashTableBits);
191 return reinterpret_cast<uint16_t*>(reinterpret_cast<uintptr_t>(table) +
192 (hash & mask));
193}
194
195} // namespace
196

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected