def jpeg.huff.find

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

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

131def jpeg.huff.find(xs: List<&2, JPEGHuff>, +id: U32, +ac: Bool) -> Bin.Huffman:
132  match xs:
133    case Nil{}: Bin.HuffEmpty{}
134    case Con{JPEGHuff{key, kind, node}, rest}: U.branch(Bin.Huffman, U32.is_eq(key, id) && U.choose(Bool, kind, ac, Bool.not(ac)), _ => node, _ => jpeg.huff.find(rest, id, ac))

Uses (10)

Used by (2)