def decode.sst_count.value

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

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

246# Selects the empty or one-table layout from its declared file count.
247def decode.sst_count.value(
248  input: Bytes.Bytes,
249  field: Maybe<&2, U32>
250) -> Result<&1, &1, Error, ManifestValue>:
251  match field:
252    case None{}: Fail{Malformed{}}
253    case Some{0}: decode.checksum(input, Empty{}, 24, 56)
254    case Some{1}: decode.sst_name(input)
255    case _: Fail{Malformed{}}

Uses (11)

Used by (1)