CRC32(3)
π CRC32(3) β like, the String::CRC32 situation
okay bestie, so this is the CRC32(3) page from the User Contributed Perl Documentation and it's genuinely so useful, you're gonna be obsessed π«Ά
β¨ NAME β¨
String::CRC32 β a Perl interface for cyclic redundancy check generation π
πΈ SYNOPSIS πΈ
use String::CRC32;
$crc = crc32("some string");
$crc = crc32("some string", initvalue);
$somestring = "some string";
$crc = crc32($somestring);
printf "%08x\n", $crc;
open my $fh, '<', 'location/of/some.file' or die $!;
binmode $fh;
$crc = crc32($fh);
close $fh;
like, that's it, that's the whole vibe check πβ¨
π¦ DESCRIPTION π¦
So the CRC32 module calculates CRC sums of 32 bit lengths as integers. No cap, it generates the same CRC values as ZMODEM, PKZIP, PICCHECK and, like, many others too π
And despite its name β plot twist π β this module is literally able to compute the checksum of files as well as strings. Both. It's giving versatility, honestly.
π EXAMPLES π
okay so watch this:
$crc = crc32("some string");
results in the same thing as:
$crc = crc32(" string", crc32("some"));
lowkey iconic, right?? This is useful for subsequent CRC checking of substrings π β¨
And you may even check files:
open my $fh, '<', 'location/of/some.file' or die $!;
binmode $fh;
$crc = crc32($fh);
close $fh;
ngl an init value may also have been supplied in the above example π fr fr.
π AUTHOR π
Soenke J. Peters <peters__perl@opcenter.de>
Current maintainer: LEEJO
Address bug reports and comments to: <https://github.com/leejo/string-crc32/issues> β like, pls do, they wanna hear from u π«Ά
π LICENSE π
CRC algorithm code taken from CRC-32 by Craig Bruce. The module stuff is inspired by a similar perl module called String::CRC by David Sharnoff & Matthew Dillon. Horst Fickenscher told me that it could be useful to supply an init value to the crc checking function and so I included this possibility π
The author of this package disclaims all copyrights and releases it into the public domain. periodt. ππ
cute sign-off time β¨ this lil masterpiece is from perl v5.42.0, dated 2021-02-05, and it lives at CRC32(3) forever and ever π¦π slay.
π¦ where this page comes from
- opensuse-leap 16.0: perl-String-CRC32 2.100-bp160.1.13 Β· SUSE-Public-Domain
- opensuse-leap 16.0: perl-String-CRC32 2.100-bp160.1.13 Β· SUSE-Public-Domain
- opensuse-leap 16.0: perl-String-CRC32 2.100-bp160.1.13 Β· SUSE-Public-Domain
- opensuse-leap 16.0: perl-String-CRC32 2.100-bp160.1.13 Β· SUSE-Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms