def main

bend-osdev-crc@0.1.0.0 · check.bend:22

import bend-osdev-crc@0.1.0.0/check.bend as Check
import Base
import bend-osdev-word64@0.1.0.0/word64.bend as W
import bend-osdev-bytes@0.1.0.0/bytes.bend as B
import bend-osdev-crc@0.1.0.0/crc.bend as C
import bend-osdev-crc@0.1.0.0/table.bend as T

22def main() -> IO(Unit):
23  +big = bulk(102400n)
24  do IO<Unit>:
25    IO.print(B.hex(B.be32(C.crc32c(nine()))))
26    IO.print(B.hex(B.be32(C.crc32(nine()))))
27    IO.print(B.hex(B.be16(C.crc16(nine()))))
28    IO.print(B.hex(B.be16(C.crc_t10dif(nine()))))
29    IO.print(W.W64.show_hex(C.crc64_ecma(nine())))
30    IO.print(W.W64.show_hex(C.crc64_xz(nine())))
31    IO.print(W.W64.show_hex(C.crc64_nvme(nine())))
32    IO.print(B.hex(B.be32(C.Crc32Spec.finish(C.crc32c.spec(), C.Crc32Spec.update(C.crc32c.spec(), C.Crc32Spec.update(C.crc32c.spec(), C.Crc32Spec.start(C.crc32c.spec()), B.Octets.of_string("1234")), B.Octets.of_string("56789"))))))
33    IO.print(B.hex(B.be32(C.crc32c(big))))
34    IO.print(B.hex(B.be32(T.Crc32Spec.compute_fast(C.crc32c.spec(), big))))
35    IO.print(W.W64.show_hex(T.Crc64Spec.compute_fast(C.crc64_xz.spec(), big)))
36    IO.print(U32.show(C.crc4_itu(nine())))
37    IO.print(U32.show(C.crc7_mmc(nine())))
38    IO.print(U32.show(C.crc8_smbus(nine())))
39    IO.print(U32.show(C.crc8_itu(nine())))
40    IO.print(U32.show(C.crc8_maxim(nine())))
41    IO.print(U32.show(C.crc8_dvb_s2(nine())))
42    IO.print(U32.show(C.crc8_autosar(nine())))
43    IO.print(B.hex(B.be16(C.crc16_kermit(nine()))))
44    IO.print(B.hex(B.be16(C.crc16_ccitt_false(nine()))))
45    IO.print(B.hex(B.be16(C.crc16_xmodem(nine()))))
46    IO.print(U32.show(C.Crc32Spec.finish(C.crc7_mmc.spec(), C.Crc32Spec.update(C.crc7_mmc.spec(), C.Crc32Spec.update(C.crc7_mmc.spec(), C.Crc32Spec.start(C.crc7_mmc.spec()), B.Octets.of_string("1234")), B.Octets.of_string("56789")))))

Uses (37)

Used by (0)

No other definition uses this definition.