def read_bytes

mylsm-lsm-store@0.6.0.1 · src/Fs.bend:188

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

188# Read one bounded packed chunk; nonempty short reads are not EOF.
189def read_bytes(
190  file: File,
191  max: U32
192) ->
193  IO(File & Result<&1, &1, U32 & String, StorageBytes.Bytes>):
194  do IO<File & Result<&1, &1, U32 & String, StorageBytes.Bytes>>:
195    pair : File & Result<&1, &1, U32 & String, U32 & Array<U32>> <- read_words(file, max)
196    return read_bytes.pair(pair)

Uses (12)

Used by (2)