def record.size
import mylsm-lsm-store@0.6.0.1/src/ByteSstFile.bend as ByteSstFileimport Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
336# Measures a put or tombstone record from exact raw byte lengths.
337def record.size(pair: Bytes.Bytes & U32, value: Maybe<&1, Bytes.Bytes>) -> Nat:
338 match pair:
339 case (_, +key_len):
340 match value:
341 case None{}:
342 Nat.add(5n, U32.to_nat(key_len))
343 case Some{bytes}:
344 record.size.put(key_len, Bytes.length(bytes))