def decode.v5.sst.count.value

mylsm-lsm-store@0.6.0.1 · src/ByteManifest.bend:319

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

319def decode.v5.sst.count.value(
320  input: Bytes.Bytes,
321  count_field: Maybe<&2, U32>
322) -> Result<&1, &1, Error, ManifestValue>:
323  match count_field:
324    case None{}: Fail{Malformed{}}
325    case Some{0}:
326      decode.checksum(input, GenerationEmpty{}, 24, 56)
327    case Some{1}:
328      decode.v5.sst.field(Bytes.get.u32be(input, 24))
329    case _: Fail{Malformed{}}

Uses (12)

Used by (1)