Copyright | (c) Ivan Lazar Miljenovic |
---|---|
License | MIT |
Maintainer | Ivan.Miljenovic@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
This module provides functions for encoding/decoding values within a Quiver.
For any I/O operations, use the functions provided by the quiver-bytestring package.
- spput :: Binary a => SConsumer a PutM e
- spget :: Binary a => SProducer a Get e
- spdecode :: (Binary a, Monad m) => SP ByteString a m String
- spdecodeL :: forall a m. (Binary a, Monad m) => SP ByteString a m String
- spencode :: (Binary a, Functor m) => SP a ByteString m ()
- spencodeL :: Binary a => SP a ByteString m ()
Simple encoding/decoding
Conversions to/from ByteStrings
spdecode :: (Binary a, Monad m) => SP ByteString a m String Source
Decode all values from the provided stream of strict ByteStrings. Note
that the error message does not return the ByteOffset
from the
Decoder
as it will probably not match the actual location of the
source ByteString.
spdecodeL :: forall a m. (Binary a, Monad m) => SP ByteString a m String Source
Decode all values from the provided stream of lazy ByteStrings. Note
that the error message does not return the ByteOffset
from the
Decoder
as it will probably not match the actual location of the
source ByteString.
spencode :: (Binary a, Functor m) => SP a ByteString m () Source
Encode all values to a stream of strict ByteStrings.
spencodeL :: Binary a => SP a ByteString m () Source
Encode all values to a stream of lazy ByteStrings.