def decode.frame.length
import mylsm-lsm-store@0.6.0.1/src/ByteWal.bend as ByteWalimport 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
944# Validates a packed frame length before reading its count and records.
945def decode.frame.length(pair: Bytes.Bytes & U32) -> Result<&1, &1, Wal.Error, FrameHeader>:
946 match pair:
947 case (frame, +total):
948 decode.header.length(Bytes.get.u32be(frame, 0), total)