Jpeg.jpeg.huff.symbols: def of gralha-jpeg-decode@0.1.0.1 Import: import gralha-jpeg-decode@0.1.0.1/jpeg.bend as Jpeg Lines 154-160 of gralha-jpeg-decode@0.1.0.1/jpeg.bend: https://jend.leeeet.dev/read.txt?path=gralha-jpeg-decode@0.1.0.1/jpeg.bend&start_line=154&end_line=160 import Base import gralha-bytes@0.1.0.1/bytes.bend as Bin def jpeg.huff.symbols(n: Nat, +src: Bin.Bytes, +bits: U32, +coding: JPEGCoding) -> JPEGCoding: match n: case 0n: coding case 1n+d: JPEGCoding{node, cw0, at, valid} = coding +cw = cw0 jpeg.huff.symbols(d, src, bits, JPEGCoding{Bin.huff.insert(node, U32.to_nat(bits), cw, Bin.bytes.get(src, at)), U32.inc(cw), U32.inc(at), valid && U32.is_lt(cw, (U32.shln(1, U32.to_nat(bits)) - 1 : U32))}) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.inc https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_lt 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=gralha-bytes@0.1.0.1/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=gralha-bytes@0.1.0.1/bytes.bend&name=bytes.get https://jend.leeeet.dev/definition.txt?path=gralha-bytes@0.1.0.1/bytes.bend&name=huff.insert https://jend.leeeet.dev/definition.txt?path=gralha-jpeg-decode@0.1.0.1/jpeg.bend&name=JPEGCoding