flat-0.3.2: Principled and efficient bit-oriented binary serialization.

Safe HaskellNone
LanguageHaskell2010

Data.Flat.Encoder

Synopsis

Documentation

(<>) :: Monoid m => m -> m -> m infixr 6 #

An infix synonym for mappend.

Since: 4.5.0.0

type NumBits = Int Source #

Number of bits

mempty :: Monoid a => a #

Identity of mappend

encodeArrayWith :: (t -> Encoding) -> [t] -> Encoding Source #

Encode as Array

encodeListWith :: (t -> Encoding) -> [t] -> Encoding Source #

Encode as a List

type Size a = a -> NumBits -> NumBits Source #

Calculate the size (in bits) of the encoding of a value