MCPcopy Create free account
hub / github.com/albertobsd/keyhunt / test_bit

Function test_bit

bloom/bloom.cpp:49–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49inline static int test_bit(uint8_t *bf, uint64_t bit)
50{
51 uint64_t byte = bit >> 3;
52 uint8_t c = bf[byte]; // expensive memory access
53 uint8_t mask = 1 << (bit % 8);
54 if (c & mask) {
55 return 1;
56 } else {
57 return 0;
58 }
59}
60
61static int bloom_check_add(struct bloom * bloom, const void * buffer, int len, int add)
62{

Callers 1

bloom_checkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected