Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
PlutusCore.Flat.Filler
Description
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 PlutusCore.Flat.Filler | |
Eq Filler Source # | |
Ord Filler Source # | |
Defined in PlutusCore.Flat.Filler | |
Flat Filler Source # | Use a special encoding for the filler |
type Rep Filler Source # | |
Defined in PlutusCore.Flat.Filler type Rep Filler = D1 ('MetaData "Filler" "PlutusCore.Flat.Filler" "plutus-core-1.54.0.0-inplace-flat" '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.
Constructors
PreAligned | |
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
Constructors
PostAligned | |
Fields
|
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