Safe Haskell | Safe-Inferred |
---|---|
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
- preAlignedDecoder :: Get b -> Get b
- postAlignedDecoder :: Get b -> Get b
Documentation
A meaningless sequence of 0 bits terminated with a 1 bit (easier to implement than the reverse)
Used to align encoded values at byte/word boundaries.
Instances
Generic Filler Source # | |
Show Filler Source # | |
NFData Filler Source # | |
Defined in Flat.Filler | |
Flat Filler Source # | Use a special encoding for the filler |
Eq Filler Source # | |
Ord Filler Source # | |
Defined in Flat.Filler | |
type Rep Filler Source # | |
Defined in Flat.Filler type Rep Filler = D1 ('MetaData "Filler" "Flat.Filler" "flat-0.6-1WlbUhm5YUo9fW0wNGU0pJ" 'False) (C1 ('MetaCons "FillerBit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (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
preAlignedDecoder :: Get b -> Get b Source #
Decode a value assuming that is PreAligned
Since: 0.5
postAlignedDecoder :: Get b -> Get b Source #
Decode a value assuming that is PostAligned