def jpeg.components.read

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

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

188def jpeg.components.read(n: Nat, +src: Bin.Bytes, +at: U32) -> List<&2, JPEGComponent>:
189  match n:
190    case 0n: Nil{}
191    case 1n+d:
192      +hv = Bin.bytes.get(src, U32.inc(at))
193      Con{JPEGComponent{Bin.bytes.get(src, at), (hv / 16 : U32), (hv % 16 : U32), Bin.bytes.get(src, (at + 2 : U32)), 0, 0, 0, 0, 0, Bin.bytes.empty(), Bin.bytes.empty()}, jpeg.components.read(d, src, (at + 3 : U32))}

Uses (11)

Used by (1)