def client.fragment.padded

bend-kit-http2@0.4.0.0 · http2.bend:915

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

915def client.fragment.padded(padded: Bool, +fixed: U32, b: Bytes.Bytes) -> Bytes.Bytes:
916  match padded:
917    case False{}:
918      client.fragment.slice(b, fixed, 0)
919    case True{}:
920      with_number(Bytes.Bytes, Bytes.get(b, 0), rest => pad =>
921        client.fragment.slice(rest, (fixed + 1 : U32), pad))

Uses (7)

Used by (1)