leb128-0.1.0.0: LEB128 encoding logic for and in Haskell

Safe HaskellNone
LanguageHaskell2010

Codec.LEB128

Contents

Description

Encode numbers to and from bytestrings using the (S)LEB128 encoding.

The implementation is backed by the generic algorithms defined in Codec.LEB128.Generic.

Synopsis

Encode values as bytestring builder.

toULEB128Builder :: LEB128 a => a -> Builder Source #

Encode values as bytestring builder.

Encode value as bytestring.

Encode value from bytestring.

Encode value from bytestring. Throws an error if not enough bytes are provided.