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

Function TableEntry4ByteMatch

snappy.cc:179–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177}
178
179inline uint16_t* TableEntry4ByteMatch(uint16_t* table, uint32_t bytes,
180 uint32_t mask) {
181 constexpr uint32_t kMagic = 2654435761U;
182 const uint32_t hash = (kMagic * bytes) >> (32 - kMaxHashTableBits);
183 return reinterpret_cast<uint16_t*>(reinterpret_cast<uintptr_t>(table) +
184 (hash & mask));
185}
186
187inline uint16_t* TableEntry8ByteMatch(uint16_t* table, uint64_t bytes,
188 uint32_t mask) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected