def integer.encoded

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

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

519def integer.encoded(small: Bool, +prefix: U32, +mask: U32, +value: U32) -> Bytes.Bytes:
520  match small:
521    case True{}:
522      Bytes.from_string(SCon{Chr{(prefix .|. value : U32)}, SNil{}})
523    case False{}:
524      Bytes.from_string(SCon{Chr{(prefix .|. mask : U32)},
525        integer.tail(5n, (value - mask : U32), True{})})

Uses (9)

Used by (1)