File.file.reads.given: def of snap@1.4.0.0 Import: import snap@1.4.0.0/src/file.bend as File Lines 56-62 of snap@1.4.0.0/src/file.bend: https://jend.leeeet.dev/read.txt?path=snap@1.4.0.0/src/file.bend&start_line=56&end_line=62 import Base # a size of 0 is no size to go by; any other is read to def file.reads.given(none: Bool, bytes: U32) -> Nat: match none: case True{}: file.unsized() case False{}: U32.to_nat(U32.add(U32.div(bytes, 65536), 2)) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.div https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=snap@1.4.0.0/src/file.bend&name=file.unsized