multiformats / multicodec

Compact self-describing codecs. Save space by using predefined multicodec tables.
MIT License
341 stars 205 forks source link

Add CRC32 and CRC64 multihash #303

Closed IS4Code closed 1 year ago

rvagg commented 2 years ago

discussion about whether or not we can include non-cryptographic hashes is happening in #301; the same thing would apply here

vmx commented 1 year ago

I don't know much about CRC, but after having a quick look the CRC Wikipedia article it seems that "CRC32" is well defined (ISO/IEEE etc.), but it's not so clear for CRC64. Would it make sense to include only CRC32 for now?

IS4Code commented 1 year ago

@vmx Well, my decision to include both was motivated by .NET, where you have Crc32, Crc64. XxHash32, and XxHash64, so it is likely to see people wanting to use all 4 of them interchangeably (making this is a nice counterpart to the xxHash proposal). Would it be fine to use a more specific identifier (crc64-ecma)? The other variant (CRC-64-ISO) is described as "weak for hashing", so I suppose it's not as likely to be seen.