quiver-binary-0.1.0.0: Binary serialisation support for Quivers

Copyright(c) Ivan Lazar Miljenovic
LicenseMIT
MaintainerIvan.Miljenovic@gmail.com
Safe HaskellNone
LanguageHaskell2010

Control.Quiver.Binary

Contents

Description

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.

Synopsis

Simple encoding/decoding

spput :: Binary a => SConsumer a PutM e Source

Encode all values.

spget :: Binary a => SProducer a Get e Source

Decode all values.

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.