#include "components/optimization_guide/core/bloom_filter.h"
#include <stddef.h>
#include <stdint.h>
#include "base/check_op.h"
#include "third_party/smhasher/src/MurmurHash3.h"
namespace optimization_guide {
namespace {
uint64_t MurmurHash3(const std::string& str, uint32_t seed) { … }
}
BloomFilter::BloomFilter(uint32_t num_hash_functions, uint32_t num_bits)
: … { … }
BloomFilter::BloomFilter(uint32_t num_hash_functions,
uint32_t num_bits,
std::string filter_data)
: … { … }
BloomFilter::~BloomFilter() = default;
bool BloomFilter::Contains(const std::string& str) const { … }
void BloomFilter::Add(const std::string& str) { … }
}