def frame_length_allowed
import mylsm-lsm-store@0.6.0.1/src/Wal.bend as Walimport Base
import mylsm-lsm-store@0.6.0.1/src/StorageBytes.bend as StorageBytes
266# Checks an encoded WAL frame against its byte cap.
267def frame_length_allowed(+count: U32, +length: U32) -> Bool:
268 U32.is_le(length, StorageBytes.MAX_BLOCK_BYTES()) ||
269 U32.is_eq(count, 1) && U32.is_le(length,
270 (StorageBytes.MAX_RECORD_BYTES() + 36 : U32))