cereal-0.3.3.0: A binary serialization library

StabilityPortability :
MaintainerTrevor Elliott <trevor@galois.com>

Data.Serialize

Contents

Description

 

Synopsis

The Serialize class

class Serialize t whereSource

Methods

put :: Putter tSource

Encode a value in the Put monad.

get :: Get tSource

Decode a value in the Get monad

Serialize serialisation

encode :: Serialize a => a -> ByteStringSource

Encode a value using binary serialization to a strict ByteString.

encodeLazy :: Serialize a => a -> ByteStringSource

Encode a value using binary serialization to a lazy ByteString.

decode :: Serialize a => ByteString -> Either String aSource

Decode a value from a strict ByteString, reconstructing the original structure.

decodeLazy :: Serialize a => ByteString -> Either String aSource

Decode a value from a lazy ByteString, reconstructing the original structure.