def checksum.adler.loop
import gralha-bytes@0.1.0.1/bytes.bend as Bytesimport Base
366def checksum.adler.loop(n: Nat, +src: Bytes, +index: U32, +a: U32, b: U32) -> U32:
367 match n:
368 case 0n: (b * 65536 + a : U32)
369 case 1n+d:
370 +aa = ((a + bytes.get(src, index)) % 65521 : U32)
371 checksum.adler.loop(d, src, U32.inc(index), aa, ((b + aa) % 65521 : U32))