digest icon indicating copy to clipboard operation
digest copied to clipboard

Implement Digest::CRC32

Open casperisfine opened this issue 9 months ago • 0 comments

Ref: https://github.com/ruby/digest/issues/77

CRC32 is relatively commonly needed for network protocol (e.g. erro checking in AWS-s3, etc) and some archive formats like zip. As such it would be helpful to have a reasonably efficient implementation built-in.

This is a clean implementation derived from the Wikipedia article, there are more optimized implementations out there, but not sure it's really worth including complicated code. I mostly meant this as a way to familiarize myself with digest before I attempt to write a PR for BLAKE-3.

About JRuby, I tried to figure out how to implement another Java digest, but I couldn't figure it out. It seems like the digest them isn't actually doing any digest and the actual code is in jruby itself? @headius is that correct? If so, how am I supposed to add crc32 support?

casperisfine avatar Apr 24 '25 13:04 casperisfine