binary-0.2: Binary serialization using lazy ByteStringsContentsIndex
Data.Binary.Put
PortabilityPortable to Hugs and GHC. Requires MPTCs
Stabilitystable
MaintainerLennart Kolmodin <kolmodin@dtek.chalmers.se>
Contents
The Put type
Flushing the implicit parse state
Primitives
Big-endian primitives
Little-endian primitives
Description
The Put monad. A monad for efficiently constructing lazy bytestrings.
Synopsis
type Put = PutM ()
runPut :: Put -> ByteString
flush :: Put
putWord8 :: Word8 -> Put
putByteString :: ByteString -> Put
putLazyByteString :: ByteString -> Put
putWord16be :: Word16 -> Put
putWord32be :: Word32 -> Put
putWord64be :: Word64 -> Put
putWord16le :: Word16 -> Put
putWord32le :: Word32 -> Put
putWord64le :: Word64 -> Put
The Put type
type Put = PutM ()
runPut :: Put -> ByteString
Run the Put monad with a serialiser
Flushing the implicit parse state
flush :: Put
Pop the ByteString we have constructed so far, if any, yielding a new chunk in the result ByteString.
Primitives
putWord8 :: Word8 -> Put
Efficiently write a byte into the output buffer
putByteString :: ByteString -> Put
An efficient primitive to write a strict ByteString into the output buffer. It flushes the current buffer, and writes the argument into a new chunk.
putLazyByteString :: ByteString -> Put
Write a lazy ByteString efficiently, simply appending the lazy ByteString chunks to the output buffer
Big-endian primitives
putWord16be :: Word16 -> Put
Write a Word16 in big endian format
putWord32be :: Word32 -> Put
Write a Word32 in big endian format
putWord64be :: Word64 -> Put
Write a Word64 in big endian format
Little-endian primitives
putWord16le :: Word16 -> Put
Write a Word16 in little endian format
putWord32le :: Word32 -> Put
Write a Word32 in little endian format
putWord64le :: Word64 -> Put
Write a Word64 in little endian format
Produced by Haddock version 0.8