def encode.put.sized
mylsm-lsm-store@0.6.0.1 · src/coordinator/Operation.bend:308
import mylsm-lsm-store@0.6.0.1/src/coordinator/Operation.bend as Operation
import Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
308def encode.put.sized(
309 key_pair: Bytes.Bytes & U32,
310 value_pair: Bytes.Bytes & U32
311) -> Bytes.Bytes:
312 match key_pair:
313 case (key, key_length):
314 match value_pair:
315 case (value, value_length):
316 Bytes.concat([u32.bytes(key_length), u32.bytes(value_length), key, value])