On 31/10/2024 18:35, Sam Russell wrote:
 > `cksum -a crc32` could be added I suppose to select the current 
implementation in gnulib

both versions are CRC32 though, and then if you look at the iSCSI/SCTP version 
they use CRC32-C which uses a totally different polynomial, not just a reversed 
order one like gzip

Right. So if presenting what's in gnulib now from coreutils,
we would be better to distinguish which crc32 we're referring to.
I see 'crc32b' is commonly used for the current gnulib implementation.
So I can add `cksum -a crc32b` very easily now to coreutils.
I'll send a patch tomorrow for that.


 > I'd be especially reluctant to add the existing cksum crc variant to gnulib,
 > since I don't see anything but cksum itself using that.

I need to research a little further, but bzip2 uses the same implementation as 
cksum afaik

Yes it does (albeit with a 0xFFFFFFFF initial value, and a final XOR with 
0xFFFFFFFF),
while cksum uses 0, and 0 for these respectively.
However bzip2 doesn't use gnulib, so that wouldn't be a reason to add it to 
gnulib.

cheers,
Pádraig.

Reply via email to