def jpeg.scan.select
import gralha-jpeg-decode@0.1.0.1/jpeg.bend as Jpegimport Base
import gralha-bytes@0.1.0.1/bytes.bend as Bin
498def jpeg.scan.select(n: Nat, +src: Bin.Bytes, +at: U32, +xs: List<&2, JPEGComponent>) -> List<&2, JPEGComponent>:
499 match n:
500 case 0n: Nil{}
501 case 1n+d: Con{jpeg.component.tables(jpeg.component.find(xs, Bin.bytes.get(src, at)), Bin.bytes.get(src, U32.inc(at))), jpeg.scan.select(d, src, (at + 2 : U32), xs)}