Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Unsigned LEB128 codec.
Any getXXX decoder can decode bytes generated using any of the putXXX encoders, provided the encoded number fits in the target type.
Synopsis
- putNatural :: Natural -> Put
- putWord64 :: Word64 -> Put
- putWord32 :: Word32 -> Put
- putWord16 :: Word16 -> Put
- putWord8 :: Word8 -> Put
- putWord :: Word -> Put
- getNatural :: Word -> Get Natural
- getWord64 :: Get Word64
- getWord32 :: Get Word32
- getWord16 :: Get Word16
- getWord8 :: Get Word8
- getWord :: Get Word
- getInteger :: Word -> Get Integer
- getInt64 :: Get Int64
- getInt32 :: Get Int32
- getInt16 :: Get Int16
- getInt8 :: Get Int8
- getInt :: Get Int
- putByteString :: ByteString -> Put
- getByteString :: Get ByteString
- putLazyByteString :: ByteString -> Put
- getLazyByteString :: Get ByteString
- putShortByteString :: ShortByteString -> Put
- getShortByteString :: Get ShortByteString
Put
putNatural :: Natural -> Put Source #
Get
ByteString
putByteString :: ByteString -> Put Source #
Puts a strict ByteString
with its ULEB128-encoded length as prefix.
See getByteString
.
getByteString :: Get ByteString Source #
Gets a strict ByteString
with its ULEB128-encoded length as prefix.
See putByteString
.
Lazy
putLazyByteString :: ByteString -> Put Source #
Puts a lazy ByteString
with its ULEB128-encoded length as prefix.
See getLazyByteString
.
getLazyByteString :: Get ByteString Source #
Gets a lazy ByteString
with its ULEB128-encoded length as prefix.
See putLazyByteString
.
Short
putShortByteString :: ShortByteString -> Put Source #
Puts a ShortByteString
with its ULEB128-encoded length as prefix.
See getShortByteString
.
getShortByteString :: Get ShortByteString Source #
Gets a ShortByteString
with its ULEB128-encoded length as prefix.
See putShortByteString
.