Hpack.literal.encode: def of bend-kit-http2@0.4.0.0 Import: import bend-kit-http2@0.4.0.0/hpack.bend as Hpack Lines 546-551 of bend-kit-http2@0.4.0.0/hpack.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-http2@0.4.0.0/hpack.bend&start_line=546&end_line=551 import Base import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes import bend-kit-http2@0.4.0.0/huffman.bend as Huff def literal.encode(huff: Bool, s: String) -> Maybe<&1, Bytes.Bytes>: match huff: case True{}: Maybe.map(&1, Bytes.Bytes, Bytes.Bytes, b => literal.pack(b, True{}), Huff.encode(s)) case False{}: Maybe.map(&1, Bytes.Bytes, Bytes.Bytes, b => literal.pack(b, False{}), literal.raw(s)) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe.map https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=bend-kit-http2@0.4.0.0/hpack.bend&name=literal.pack https://jend.leeeet.dev/definition.txt?path=bend-kit-http2@0.4.0.0/hpack.bend&name=literal.raw https://jend.leeeet.dev/definition.txt?path=bend-kit-http2@0.4.0.0/huffman.bend&name=encode