def file.measured

mylsm-lsm-store@0.6.0.1 · src/ByteSstFile.bend:311

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

311# Unpacks frame bytes and their measured length.
312def file.measured(
313  pair: Bytes.Bytes & U32,
314  +level: U32,
315  +total: U32
316) -> Result<&1, &1, Error, Bytes.Bytes>:
317  match pair:
318    case (frame, +payload_len):
319      file.bounded(frame, level, total, payload_len,
320        U32.is_le(payload_len, StorageBytes.MAX_BLOCK_BYTES()))

Uses (9)

Used by (1)