def jpeg.huff.lengths

gralha-jpeg-decode@0.1.0.1 · jpeg.bend:166

import gralha-jpeg-decode@0.1.0.1/jpeg.bend as Jpeg
import Base
import gralha-bytes@0.1.0.1/bytes.bend as Bin

166def jpeg.huff.lengths(n: Nat, +src: Bin.Bytes, +counts: U32, +bits: U32, +coding: JPEGCoding) -> JPEGCoding:
167  match n:
168    case 0n: coding
169    case 1n+d: jpeg.huff.lengths(d, src, U32.inc(counts), U32.inc(bits), jpeg.huff.shift(jpeg.huff.symbols(U32.to_nat(Bin.bytes.get(src, counts)), src, bits, coding)))

Uses (9)

Used by (1)