1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! Tables: immutable sorted files of keys, searched without reading them whole.
//!
//! ```text
//! [data block]* [filter block] [index block] [properties block] [footer]
//! ```
//!
//! Data blocks hold the entries in key order, each closed once it reaches the target size. The
//! index block has one entry per data block: the block's last key, mapped to where the block
//! is. The filter answers "certainly absent" for keys the table does not hold, so a lookup that
//! misses usually reads no data block at all. The properties block records facts about the table
//! (its entry count), and the footer locates the other three and names the format version.
//! Every block is sealed with a checksum verified on every read (see the handle module docs).
//!
//! A table is written once by [`TableBuilder`] and never changed. [`Table`] opens it from its
//! bytes, or through reads of a file it keeps only the metadata of; data blocks then come from a
//! [`BlockSource`], which may make a walk wait for a block (see the source module). Any number of
//! [`TableIter`]s may walk a table at once.
pub use TableBuilder;
pub use Compression;
pub use ;
pub use TableIter;
pub use Table;
pub use ;
/// How a table is laid out.