def Huff.decode
import bend-kit-bits@0.1.0.1/bits.bend as Bitsimport Base
309# One symbol, and the reader past its code. None, with the reader unchanged, when the next
310# bits start no code or the input ends inside one.
311def Huff.decode(h: Huff, r: Reader) -> Huff & Reader & Maybe<&2, U32>:
312 Huff{+msb, +max, t} = h
313 Reader{+len, buf, +pos} = r
314 decode.look(msb, max, len, pos, t, win(msb, buf, pos))