File: HPACK.hs

package info (click to toggle)
haskell-http2 5.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 55,180 kB
  • sloc: haskell: 8,657; makefile: 5
file content (72 lines) | stat: -rw-r--r-- 1,419 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{-# LANGUAGE CPP #-}

-- | HPACK(<https://tools.ietf.org/html/rfc7541>) encoding and decoding a header list.
module Network.HPACK (
    -- * Encoding and decoding
    encodeHeader,
    decodeHeader,

    -- * Encoding and decoding with token
    encodeTokenHeader,
    decodeTokenHeader,

    -- * DynamicTable
    DynamicTable,
    defaultDynamicTableSize,
    newDynamicTableForEncoding,
    newDynamicTableForDecoding,
    withDynamicTableForEncoding,
    withDynamicTableForDecoding,
    setLimitForEncoding,

    -- * Strategy for encoding
    CompressionAlgo (..),
    EncodeStrategy (..),
    defaultEncodeStrategy,

    -- * Errors
    DecodeError (..),
    BufferOverrun (..),

    -- * Headers
    HeaderList,
    Header,
    HeaderName,
    HeaderValue,
    TokenHeaderList,
    TokenHeader,

    -- * Value table
    ValueTable,
    HeaderTable,
    getHeaderValue,
    toHeaderTable,

    -- * Basic types
    Size,
    Index,
    Buffer,
    BufferSize,

    -- * Re-exports
    original,
    foldedCase,
    mk,
) where

#if __GLASGOW_HASKELL__ < 709
import Control.Applicative ((<$>))
#endif
import Data.CaseInsensitive

import Network.HPACK.HeaderBlock
import Network.HPACK.Table
import Network.HPACK.Types

-- | Default dynamic table size.
--   The value is 4,096 bytes: an array has 128 entries.
--
-- >>> defaultDynamicTableSize
-- 4096
defaultDynamicTableSize :: Int
defaultDynamicTableSize = 4096