def checksum.crc.word
import gralha-bytes@0.1.0.1/bytes.bend as Bytesimport Base
import gralha-text-scan@0.1.0.1/scan.bend as U
376def checksum.crc.word(n: Nat, +word: U32) -> U32:
377 match n:
378 case 0n: word
379 case 1n+d: checksum.crc.word(d, U32.xor(U32.shr(word), U.choose(U32, U32.is_eq(U32.and(word, 1), 1), 3988292384, 0)))