def jpeg.history.set
import gralha-jpeg-decode@0.1.0.1/jpeg.bend as Jpegimport Base
import gralha-bytes@0.1.0.1/bytes.bend as Bin
542def jpeg.history.set(n: Nat, +index: U32, +low: U32, history: Bin.Bytes) -> Bin.Bytes:
543 match n:
544 case 0n: history
545 case 1n+d: jpeg.history.set(d, U32.inc(index), low, Bin.bytes.set(history, index, U32.inc(low)))