RosettaCodeData/Task/CRC-32/Perl-6/crc-32-1.pl6
2016-12-05 22:15:40 +01:00

6 lines
201 B
Raku

use NativeCall;
sub crc32(int32 $crc, Buf $buf, int32 $len --> int32) is native('z') { * }
my $buf = 'The quick brown fox jumps over the lazy dog'.encode;
say crc32(0, $buf, $buf.bytes).fmt('%08x');