1 import Base 2 import ./MemTable.bend as MemTable 3 import ./Sstable.bend as Sstable 4 import ./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 9 def serialize(+entries: List<&2, MemTable.Entry>, +level: Nat) -> String: 10 SstFileV2.serialize(entries, level) 11 12 13 def parse(+encoded: String) -> Maybe<&2, Sstable.Table>: 14 SstFileV2.parse(encoded) 15 16 17 # Total-parser witness used by the hardening law. 18 def is_decided(+_result: Maybe<&2, Sstable.Table>) -> Bool: 19 True{}