def record.put.value.length

mylsm-lsm-store@0.6.0.1 · src/ByteWal.bend:271

import mylsm-lsm-store@0.6.0.1/src/ByteWal.bend as ByteWal
import Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes

271# Parses a put value length after the raw key bytes.
272def record.put.value.length(
273  frame: Bytes.Bytes,
274  key: Bytes.Bytes,
275  value_length: Maybe<&2, U32>,
276  value_length_offset: U32
277) -> DecodedRecord:
278  match value_length:
279    case None{}:
280      record.malformed(frame)
281    case Some{+length}:
282      record.put.value.length.checked(Bytes.length(frame), key, length,
283        (value_length_offset + 4 : U32))

Uses (8)

Used by (1)