feat(docs): finish part 1

Signed-off-by: Alex Chi <iskyzh@gmail.com>
This commit is contained in:
Alex Chi
2022-12-23 23:45:09 -05:00
parent 9f3e29c781
commit a03cb765ff
7 changed files with 146 additions and 4 deletions

View File

@@ -10,7 +10,10 @@ pub use builder::BlockBuilder;
pub use iterator::BlockIterator;
/// A block is the smallest unit of read and caching in LSM tree. It is a collection of sorted key-value pairs.
pub struct Block {}
pub struct Block {
data: Vec<u8>,
offsets: Vec<u16>,
}
impl Block {
pub fn encode(&self) -> Bytes {