def decode.checksum.offset

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

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

900# Converts the record-end decision into a typed frame result.
901def decode.checksum.offset(
902  frame: Bytes.Bytes,
903  batch: Batch,
904  +total: U32,
905  valid: Bool
906) -> Result<&1, &1, Wal.Error, Batch>:
907  match valid:
908    case False{}:
909      Fail{Wal.Malformed{}}
910    case True{}:
911      decode.checksum.bytes(frame, batch, (total - 32 : U32))

Uses (8)

Used by (1)