Frame.decode.lead: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/lsp/frame.bend as Frame Lines 15-27 of bolt@1.27.0.0/src/lsp/frame.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/lsp/frame.bend&start_line=15&end_line=27 import Base # a lead byte, by its high nibble; a stray continuation byte stands for itself def decode.lead(hi: U32, +bb: U32, out: List<&2, Char>) -> Dec: match hi: case 12: Dec{1n, (bb .&. 31 : U32), out} case 13: Dec{1n, (bb .&. 31 : U32), out} case 14: Dec{2n, (bb .&. 15 : U32), out} case 15: Dec{3n, (bb .&. 7 : U32), out} case other: Dec{0n, 0, Char.from_u32(bb) <> out} Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char.from_u32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.Con https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.Nil https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/frame.bend&name=Dec