Check.main: def of bend-osdev-crc@0.1.0.0 Import: import bend-osdev-crc@0.1.0.0/check.bend as Check Lines 22-46 of bend-osdev-crc@0.1.0.0/check.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-crc@0.1.0.0/check.bend&start_line=22&end_line=46 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 def main() -> IO(Unit): +big = bulk(102400n) do IO: IO.print(B.hex(B.be32(C.crc32c(nine())))) IO.print(B.hex(B.be32(C.crc32(nine())))) IO.print(B.hex(B.be16(C.crc16(nine())))) IO.print(B.hex(B.be16(C.crc_t10dif(nine())))) IO.print(W.W64.show_hex(C.crc64_ecma(nine()))) IO.print(W.W64.show_hex(C.crc64_xz(nine()))) IO.print(W.W64.show_hex(C.crc64_nvme(nine()))) 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")))))) IO.print(B.hex(B.be32(C.crc32c(big)))) IO.print(B.hex(B.be32(T.Crc32Spec.compute_fast(C.crc32c.spec(), big)))) IO.print(W.W64.show_hex(T.Crc64Spec.compute_fast(C.crc64_xz.spec(), big))) IO.print(U32.show(C.crc4_itu(nine()))) IO.print(U32.show(C.crc7_mmc(nine()))) IO.print(U32.show(C.crc8_smbus(nine()))) IO.print(U32.show(C.crc8_itu(nine()))) IO.print(U32.show(C.crc8_maxim(nine()))) IO.print(U32.show(C.crc8_dvb_s2(nine()))) IO.print(U32.show(C.crc8_autosar(nine()))) IO.print(B.hex(B.be16(C.crc16_kermit(nine())))) IO.print(B.hex(B.be16(C.crc16_ccitt_false(nine())))) IO.print(B.hex(B.be16(C.crc16_xmodem(nine())))) 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): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.print https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.show https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets.of_string https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=be16 https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=be32 https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=hex https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/check.bend&name=bulk https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/check.bend&name=nine https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/crc.bend&name=Crc32Spec.finish https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/crc.bend&name=Crc32Spec.start https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/crc.bend&name=Crc32Spec.update https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/crc.bend&name=crc16 https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/crc.bend&name=crc16_ccitt_false https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/crc.bend&name=crc16_kermit https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/crc.bend&name=crc16_xmodem https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/crc.bend&name=crc32 https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/crc.bend&name=crc32c https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/crc.bend&name=crc32c.spec https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/crc.bend&name=crc4_itu https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/crc.bend&name=crc64_ecma https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/crc.bend&name=crc64_nvme https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/crc.bend&name=crc64_xz https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/crc.bend&name=crc64_xz.spec https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/crc.bend&name=crc7_mmc https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/crc.bend&name=crc7_mmc.spec https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/crc.bend&name=crc8_autosar https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/crc.bend&name=crc8_dvb_s2 https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/crc.bend&name=crc8_itu https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/crc.bend&name=crc8_maxim https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/crc.bend&name=crc8_smbus https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/crc.bend&name=crc_t10dif https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/table.bend&name=Crc32Spec.compute_fast https://jend.leeeet.dev/definition.txt?path=bend-osdev-crc@0.1.0.0/table.bend&name=Crc64Spec.compute_fast https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/word64.bend&name=W64.show_hex