Huffman.encode.last: def of bend-kit-http2@0.4.0.0 Import: import bend-kit-http2@0.4.0.0/huffman.bend as Huffman Lines 1192-1198 of bend-kit-http2@0.4.0.0/huffman.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-http2@0.4.0.0/huffman.bend&start_line=1192&end_line=1198 import Base import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes def encode.last(more: Bool, out: Bytes.Bytes, +at: U32, +partial: U32, +bits: U32) -> Bytes.Bytes: match more: case False{}: out case True{}: +pad = (8 - bits : U32) Bytes.set(out, at, ((partial << U32.to_nat(pad)) .|. ((1 << U32.to_nat(pad)) - 1 : U32) : U32)) 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=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.shln https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat 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-bytes@0.3.3.0/bytes.bend&name=set