Skip to content

Commit

Permalink
encoder note
Browse files Browse the repository at this point in the history
  • Loading branch information
nitely committed Oct 15, 2024
1 parent 5cb1ca8 commit b2db55f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/hpack/encoder.nim
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ proc cmpTableValue(

proc findInTable(h, v: openArray[char], dh: DynHeaders): int {.inline.} =
## Find a header name in table
# note linear search here is fine;
# for a 4KB table, there should be <100 entries;
# encoding is controlled by user, and they can
# disable indexing if needed
var first = -1
# todo: check if min hash is faster
for i, h0 in headersTable.pairs:
Expand Down

0 comments on commit b2db55f

Please sign in to comment.