A Perl extension that computes checksums in a way that's compatible with POSIX cksum software.
To use the module in OO style, you can clone the instance, add strings using the add() method, and get the result using the peek() or result() method. You can also add files by passing in a reference to a filehandle.
To use the module in functional style, you can call the cksum() function with strings or filehandles as arguments. The function returns the checksum and the length of the data object as a list, which is useful for emulating the cksum program.
One advantage of the module is that it does not make local copies of passed-in strings, allowing you to safely calculate checksums of large strings without memory issues. However, beware that proper use of binmode() is necessary if you are on a non-UNIX platform or processing files derived from other platforms.
In summary, if you need to calculate checksums in the same way as the POSIX cksum program, String::CRC::Cksum is a reliable and flexible choice, offering both an object oriented interface and a functional interface.
Version 0.03: N/A