#include <filter_block.h>
Definition at line 52 of file filter_block.h.
§ FilterBlockReader()
| leveldb::FilterBlockReader::FilterBlockReader |
( |
const FilterPolicy * |
policy, |
|
|
const Slice & |
contents |
|
) |
| |
Definition at line 78 of file filter_block.cc.
85 size_t n = contents.size();
89 if (last_word > n - 5)
return;
90 data_ = contents.data();
92 num_ = (n - 5 - last_word) / 4;
uint32_t DecodeFixed32(const char *ptr)
const FilterPolicy * policy_
§ KeyMayMatch()
| bool leveldb::FilterBlockReader::KeyMayMatch |
( |
uint64_t |
block_offset, |
|
|
const Slice & |
key |
|
) |
| |
Definition at line 95 of file filter_block.cc.
96 uint64_t index = block_offset >>
base_lg_;
100 if (start <= limit && limit <= static_cast<size_t>(
offset_ -
data_)) {
101 Slice filter = Slice(
data_ + start, limit - start);
103 }
else if (start == limit) {
virtual bool KeyMayMatch(const Slice &key, const Slice &filter) const =0
uint32_t DecodeFixed32(const char *ptr)
const FilterPolicy * policy_
§ base_lg_
| size_t leveldb::FilterBlockReader::base_lg_ |
|
private |
§ data_
| const char* leveldb::FilterBlockReader::data_ |
|
private |
§ num_
| size_t leveldb::FilterBlockReader::num_ |
|
private |
§ offset_
| const char* leveldb::FilterBlockReader::offset_ |
|
private |
§ policy_
The documentation for this class was generated from the following files: