HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulehttp2-5.3.10Haskell2010

Network.HPACK.Internal

  • 8 types
  • 25 values
  • Packagehttp2-5.3.10
  • Exports33
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceInteger.hs

Integer encoding/decoding

4 declarations
valueencodeInteger
  1. :: Int

    N+

  2. -> Int

    Target

  3. -> IO ByteString
#

Encoding integer with a temporary buffer whose size is 4096. No prefix is set.

Example3 expressions
BS.unpack <$> encodeInteger 5 10[10]BS.unpack <$> encodeInteger 5 1337[31,154,10]BS.unpack <$> encodeInteger 8 42[42]
valuedecodeI
  1. :: Int

    N+

  2. -> Word8

    The head of encoded integer whose prefix is already dropped

  3. -> ReadBuffer
  4. -> IO Int
#

Integer decoding with a read buffer. The first argument is N of prefix.

valuedecodeInteger
  1. :: Int

    N+

  2. -> Word8

    The head of encoded integer whose prefix is already dropped

  3. -> ByteString

    The tail of encoded integer

  4. -> IO Int
#

Integer decoding. The first argument is N of prefix.

Example3 expressions
decodeInteger 5 10 $ BS.empty10decodeInteger 5 31 $ BS.pack [154,10]1337decodeInteger 8 42 $ BS.empty42

String encoding/decoding

27 declarations

Converting to TokenHeaderList and ValueTable.

  • Multiple values of Cookie: are concatenated.

  • If a pseudo header appears multiple times, IllegalHeaderName is thrown.

  • If unknown pseudo headers appear, IllegalHeaderName is thrown.

  • If pseudo headers are found after normal headers, IllegalHeaderName is thrown.

  • If a header key contains capital letters, IllegalHeaderName is thrown.

  • If the number of header fields is too large, TooLargeHeader is thrown

  • DecodeError would be thrown if the HPACK format is broken.

  • BufferOverrun will be thrown if the temporary buffer for Huffman decoding is too small.

datadata Entry
#

Type for table entry. Size includes the 32 bytes magic number.

Instances1Show
  • Show EntryDefined in http2-5.3.10 · Network.HPACK.Table.Entry

Types

2 declarations