def reads.given

ezx@1.11.0.0 · src/io/file.bend:57

import ezx@1.11.0.0/src/io/file.bend as File
import Base

57# a size of 0 is no size to go by; any other is read to
58def reads.given(none: Bool, bytes: U32) -> Nat:
59  match none:
60    case True{}:
61      unsized()
62    case False{}:
63      U32.to_nat(U32.add(U32.div(bytes, 65536), 2))

Uses (7)

Used by (1)