def jpeg.quant.read
gralha-jpeg-decode@0.1.0.1 · jpeg.bend:136
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
136def jpeg.quant.read(n: Nat, +src: Bin.Bytes, +at: U32, +stride: U32, +index: U32, out: Bin.Bytes) -> Bin.Bytes:
137 match n:
138 case 0n: out
139 case 1n+d: jpeg.quant.read(d, src, (at + stride : U32), stride, U32.inc(index), Bin.bytes.set(out, jpeg.zigzag(index), Bin.bytes.be(src, at, U32.to_nat(stride), 0)))
140
141@unsafe