def decode.representation

bend-kit-http2@0.4.0.0 · hpack.bend:449

import bend-kit-http2@0.4.0.0/hpack.bend as Hpack
import Base

449def decode.representation(kind: U32, +first: U32, c: Cursor, +st: State, seen: Bool) -> Maybe<&1, Step>:
450  match kind:
451    case 0:
452      do Maybe<&1, Step>:
453        unused: Unit <- within(decode.ready(st))
454        decode.indexed(first, st, c)
455    case 1:
456      do Maybe<&1, Step>:
457        unused: Unit <- within(decode.ready(st))
458        decode.literal(first, 63, 0, st, c)
459    case 2:
460      decode.update(first, st, c, seen)
461    case _:
462      do Maybe<&1, Step>:
463        unused: Unit <- within(decode.ready(st))
464        decode.literal(first, 15, Bool.pick(U32, U32.is_ne((first .&. 16 : U32), 0), 2, 1), st, c)

Uses (18)

Used by (1)