Png.png.info: def of gralha-png-decode@0.1.0.1 Import: import gralha-png-decode@0.1.0.1/png.bend as Png Lines 42-45 of gralha-png-decode@0.1.0.1/png.bend: https://jend.leeeet.dev/read.txt?path=gralha-png-decode@0.1.0.1/png.bend&start_line=42&end_line=45 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 png.info(+src: Bin.Bytes) -> PNGInfo: +table = Bin.checksum.crc.table(256n, 0, Bin.bytes.empty()) U.branch(PNGInfo, U32.is_ge(Bin.bytes.size(src), 33) && U32.is_eq(Bin.bytes.be(src, 0, 4n, 0), 2303741511) && U32.is_eq(Bin.bytes.be(src, 4, 4n, 0), 218765834) && U32.is_eq(Bin.bytes.be(src, 8, 4n, 0), 13) && U32.is_eq(Bin.bytes.be(src, 12, 4n, 0), 1229472850) && U32.is_eq(Bin.checksum.crc.loop(17n, src, 12, table, 4294967295), Bin.bytes.be(src, 29, 4n, 0)), _ => png.chunks(src, 33, png.header(src, 16), table), _ => png.empty()) Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and 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=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.empty https://jend.leeeet.dev/definition.txt?path=gralha-bytes@0.1.0.1/bytes.bend&name=bytes.size https://jend.leeeet.dev/definition.txt?path=gralha-bytes@0.1.0.1/bytes.bend&name=checksum.crc.loop https://jend.leeeet.dev/definition.txt?path=gralha-bytes@0.1.0.1/bytes.bend&name=checksum.crc.table https://jend.leeeet.dev/definition.txt?path=gralha-png-decode@0.1.0.1/png.bend&name=PNGInfo https://jend.leeeet.dev/definition.txt?path=gralha-png-decode@0.1.0.1/png.bend&name=png.chunks https://jend.leeeet.dev/definition.txt?path=gralha-png-decode@0.1.0.1/png.bend&name=png.empty https://jend.leeeet.dev/definition.txt?path=gralha-png-decode@0.1.0.1/png.bend&name=png.header https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=branch