Jpeg.jpeg.frame.misc: def of gralha-jpeg-decode@0.1.0.1 Import: import gralha-jpeg-decode@0.1.0.1/jpeg.bend as Jpeg Lines 576-580 of gralha-jpeg-decode@0.1.0.1/jpeg.bend: https://jend.leeeet.dev/read.txt?path=gralha-jpeg-decode@0.1.0.1/jpeg.bend&start_line=576&end_line=580 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 def jpeg.frame.misc(+frame: JPEGFrame, +src: Bin.Bytes, +at: U32, +end: U32, +tag: U32) -> JPEGFrame: JPEGFrame{w, h, hm, vm, progressive, components, quants, huffs, restart, adobe, valid} = frame +dri = U32.is_eq(tag, 221) +app14 = U32.is_eq(tag, 238) && U32.is_ge((end - at : U32), 12) && U32.is_eq(Bin.bytes.be(src, at, 4n, 0), 1097101154) && U32.is_eq(Bin.bytes.get(src, (at + 4 : U32)), 101) JPEGFrame{w, h, hm, vm, progressive, components, quants, huffs, U.choose(U32, dri, Bin.bytes.be(src, at, 2n, 0), restart), U.choose(U32, app14, Bin.bytes.get(src, (at + 11 : U32)), adobe), valid && (Bool.not(dri) || U32.is_eq(end, (at + 2 : U32)))} Uses (13): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_ge https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub https://jend.leeeet.dev/definition.txt?path=gralha-bytes@0.1.0.1/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=gralha-bytes@0.1.0.1/bytes.bend&name=bytes.be https://jend.leeeet.dev/definition.txt?path=gralha-bytes@0.1.0.1/bytes.bend&name=bytes.get https://jend.leeeet.dev/definition.txt?path=gralha-jpeg-decode@0.1.0.1/jpeg.bend&name=JPEGFrame https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=choose