Safe Haskell | Safe-Inferred |
---|
Data.Layout.Language
Contents
Description
A DSL for describing data laid out in a regular fashion with a combination of structures and arrays.
- repeat :: Reps -> Layout -> Layout
- offset :: Bytes -> Layout -> Layout
- group :: Bytes -> Layout -> Layout
- word8 :: Layout
- word16le :: Layout
- word32le :: Layout
- word64le :: Layout
- word16be :: Layout
- word32be :: Layout
- word64be :: Layout
- optimize :: Layout -> Layout
- size :: Layout -> Int
- byteOrder :: Layout -> ByteOrder
- valueSize1 :: Layout -> Int
- valueSizeN :: Layout -> Int
- valueCount :: Layout -> Int
- chunk :: Int -> Layout -> [Layout]
Combinators
Value Formats
Optimizations
Utility
valueSize1 :: Layout -> IntSource
Calculates the size of a single value in the layout.
valueSizeN :: Layout -> IntSource
Calculates the total size of the values stored in the layout.
valueCount :: Layout -> IntSource
Counts the number of times a value is repeated in the layout.