ByteSstFile.record.size: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/ByteSstFile.bend as ByteSstFile Lines 336-344 of mylsm-lsm-store@0.6.0.1/src/ByteSstFile.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteSstFile.bend&start_line=336&end_line=344 import Base import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes # Measures a put or tombstone record from exact raw byte lengths. def record.size(pair: Bytes.Bytes & U32, value: Maybe<&1, Bytes.Bytes>) -> Nat: match pair: case (_, +key_len): match value: case None{}: Nat.add(5n, U32.to_nat(key_len)) case Some{bytes}: record.size.put(key_len, Bytes.length(bytes)) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=length https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteSstFile.bend&name=record.size.put