Portability | portable to Hugs and GHC |
---|---|
Stability | experimental |
Maintainer | Lennart Kolmodin <kolmodin@gmail.com> |
Safe Haskell | Trustworthy |
Data.Binary.Builder.Internal
Description
- writeN :: Int -> (Ptr Word8 -> IO ()) -> Builder
- writeAtMost :: Int -> (Ptr Word8 -> IO Int) -> Builder
Low-level construction of Builders
writeN :: Int -> (Ptr Word8 -> IO ()) -> Builder
Ensure that n
bytes are available, and then use f
to write
exactly n
bytes into memory.
writeAtMost :: Int -> (Ptr Word8 -> IO Int) -> Builder
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.