HORIZON HASKELLDocslts/ghc-10.0.x2b276322026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 2b27632 · 2026-10-31

  • Packagehttp2-5.4.8
  • Exports38
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceDynamic.hs

dynamic table

datadata TableSizeAction
#

Constructors

Insertion

valueinsertEntry :: Entry -> DynamicTable -> IO ()

Inserting Entry to DynamicTable.

Entries are evicted first and the new one added after, as RFC 7541 section 4.4 has it: "Before a new entry is added to the dynamic table, entries are evicted from the end of the dynamic table until the size of the dynamic table is less than or equal to (maximum size - new entry size) or until the table is empty." An entry larger than the table empties it and is not added.

The order matters to the ring. It has room for maxNumbers entries, and the table holds that many whenever they are all close to the 32-octet minimum -- at a size of 40 or 100, say. Added first, the new entry landed on the oldest one's slot, and the eviction that followed read that slot back and took out the new entry instead, leaving a dummy. After evicting there is always a free slot: every entry is 32 octets or more, so the entries left and the new one come to at most maxNumbers.

Entry

Reverse index

valuedeleteRevIndexList :: [Entry] -> RevIndex -> IO ()
#
valueinsertRevIndex :: Entry -> HIndex -> RevIndex -> IO ()
#
valuenewRevIndex :: IO RevIndex
#
valuerenewRevIndex :: RevIndex -> IO ()
#
datadata RevIndex
#

Index to entry