Safe Haskell | None |
---|---|
Language | Haskell2010 |
Pre-value and post-value byte alignments
Synopsis
- data Filler
- fillerLength :: Num a => Filler -> a
- data PreAligned a = PreAligned {}
- preAligned :: a -> PreAligned a
- data PostAligned a = PostAligned {
- postValue :: a
- postFiller :: Filler
- postAligned :: a -> PostAligned a
- postAlignedDecoder :: Get b -> Get b
Documentation
A meaningless sequence of 0 bits terminated with a 1 bit (easier to implement than the reverse) Useful to align an encoded value at byte/word boundaries.
Instances
Eq Filler Source # | |
Ord Filler Source # | |
Show Filler Source # | |
Generic Filler Source # | |
NFData Filler Source # | |
Defined in Flat.Filler | |
Flat Filler Source # | Use a special encoding for the filler |
type Rep Filler Source # | |
Defined in Flat.Filler type Rep Filler = D1 (MetaData "Filler" "Flat.Filler" "flat-0.4.4-FeVyhxo3HGG15yLcuMeV64" False) (C1 (MetaCons "FillerBit" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Filler)) :+: C1 (MetaCons "FillerEnd" PrefixI False) (U1 :: Type -> Type)) |
fillerLength :: Num a => Filler -> a Source #
Length of a filler in bits
data PreAligned a Source #
A Pre aligned value, a value preceded by a filler Useful to prealign ByteArrays, Texts and any structure that can be encoded more efficiently when byte aligned.
Instances
preAligned :: a -> PreAligned a Source #
Pre align a value
data PostAligned a Source #
A Post aligned value, a value followed by a filler Useful to complete the encoding of a top-level value
PostAligned | |
|
Instances
postAligned :: a -> PostAligned a Source #
Post align a value
postAlignedDecoder :: Get b -> Get b Source #
Decode a value assuming that is PostAligned