def frame.bounds.valid
mylsm-lsm-store@0.6.0.1 · src/ByteWal.bend:740
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
740def frame.bounds.valid(+frame_length: U32, +count: U32, +total: U32) -> Bool:
741 U32.is_le(36, frame_length) &&
742 Nat.is_eq(U32.to_nat(total), Nat.add(U32.to_nat(frame_length), 4n)) &&
743 Nat.is_le(U32.to_nat(count), Nat.div(U32.to_nat(frame_length), 5n)) &&
744 Wal.frame_length_allowed(count, frame_length)