binary-0.5.0.2: Binary serialisation for Haskell values using lazy ByteStrings
Data.Binary.Builder.Internal
Contents
Description
A module containing semi-public Builder internals that exposes low level construction functions. Modules which extend the Builder system will need to use this module while ideally most users will be able to make do with the public interface modules.
Builder
Synopsis
writeN :: Int -> (Ptr Word8 -> IO ()) -> BuilderSource
Ensure that n bytes are available, and then use f to write exactly n bytes into memory.
n
f
writeAtMost :: Int -> (Ptr Word8 -> IO Int) -> BuilderSource
Ensure that n bytes are available, and then use f to write at most n bytes into memory. f must return the actual number of bytes written.