src/SstFile.bend

mylsm-lsm-store@0.3.1.0 · 19 lines · 0 definitions

1import Base
2import mylsm-lsm-store@0.3.1.0/src/MemTable.bend as MemTable
3import mylsm-lsm-store@0.3.1.0/src/Sstable.bend as Sstable
4import mylsm-lsm-store@0.3.1.0/src/SstFileV2.bend as SstFileV2
5
6# Sole SSTable codec boundary: compact v2. The legacy v1 representation was
7# removed (no retrocompat); every file on disk is v2.
8
9def serialize(+entries: List<&2, MemTable.Entry>, +level: Nat) -> String:
10  SstFileV2.serialize(entries, level)
11
12
13def parse(+encoded: String) -> Maybe<&2, Sstable.Table>:
14  SstFileV2.parse(encoded)
15
16
17# Total-parser witness used by the hardening law.
18def is_decided(+_result: Maybe<&2, Sstable.Table>) -> Bool:
19  True{}