http2-0.0.1: HTTP/2.0 library including HPACK

Safe HaskellSafe-Inferred

Network.HPACK.HeaderBlock.Integer

Synopsis

Documentation

encode :: Int -> Int -> [Word8]Source

Integer encoding. The first argument is N of prefix.

>>> encode 5 10
[10]
>>> encode 5 1337
[31,154,10]
>>> encode 8 42
[42]

encodeOne :: Int -> Word8Source

Integer encoding.

decode :: Int -> [Word8] -> IntSource

Integer decoding. The first argument is N of prefix.

>>> decode 5 [10]
10
>>> decode 5 [31,154,10]
1337
>>> decode 8 [42]
42

decodeOne :: Word8 -> IntSource

Integer decoding.