Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Encoding
- (<>) :: Monoid m => m -> m -> m
- type NumBits = Int
- encodersS :: [Encoding] -> Encoding
- mempty :: Monoid a => a
- strictEncoder :: NumBits -> Encoding -> ByteString
- eTrueF :: Prim
- eFalseF :: Prim
- eFloat :: Float -> Encoding
- eDouble :: Double -> Encoding
- eInteger :: Integer -> Encoding
- eNatural :: Natural -> Encoding
- eWord16 :: Word16 -> Encoding
- eWord32 :: Word32 -> Encoding
- eWord64 :: Word64 -> Encoding
- eWord8 :: Word8 -> Encoding
- eBits :: NumBits -> Word8 -> Encoding
- eFiller :: Encoding
- eBool :: Bool -> Encoding
- eTrue :: Encoding
- eFalse :: Encoding
- eBytes :: ByteString -> Encoding
- eUTF16 :: Text -> Encoding
- eLazyBytes :: ByteString -> Encoding
- eShortBytes :: ShortByteString -> Encoding
- eInt :: Int -> Encoding
- eInt8 :: Int8 -> Encoding
- eInt16 :: Int16 -> Encoding
- eInt32 :: Int32 -> Encoding
- eInt64 :: Int64 -> Encoding
- eWord :: Word -> Encoding
- eChar :: Char -> Encoding
- encodeArrayWith :: (t -> Encoding) -> [t] -> Encoding
- encodeListWith :: (t -> Encoding) -> [t] -> Encoding
- type Size a = a -> NumBits -> NumBits
- arrayBits :: Int -> NumBits
- sWord :: Size Word
- sWord8 :: Size Word8
- sWord16 :: Size Word16
- sWord32 :: Size Word32
- sWord64 :: Size Word64
- sInt :: Size Int
- sInt8 :: Size Int8
- sInt16 :: Size Int16
- sInt32 :: Size Int32
- sInt64 :: Size Int64
- sNatural :: Size Natural
- sInteger :: Size Integer
- sFloat :: Size Float
- sDouble :: Size Double
- sChar :: Size Char
- sBytes :: Size ByteString
- sLazyBytes :: Size ByteString
- sShortBytes :: Size ShortByteString
- sUTF16 :: Size Text
- sFillerMax :: Size a
- sBool :: Size Bool
- sUTF8Max :: Size Text
- eUTF8 :: Text -> Encoding
Documentation
strictEncoder :: NumBits -> Encoding -> ByteString Source #
Strict encoder
eBytes :: ByteString -> Encoding Source #
eLazyBytes :: ByteString -> Encoding Source #
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
sBytes :: Size ByteString Source #
sFillerMax :: Size a Source #