Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
Zlib.crc32
Zlib.crc32(string, crc)
ext/zlib/zlib.c
View on GitHub ↗
static VALUE
rb_zlib_crc32(int argc, VALUE *argv, VALUE klass)
{
return do_checksum(argc, argv, crc32);
}
Calculates CRC checksum for string, and returns updated value of crc. If string is omitted, it returns the CRC initial value. If crc is omitted, it assumes that the initial value is given to crc. If string is an IO instance, reads from the IO until the IO returns nil and returns CRC checksum of all read data.
FIXME: expression.
See also
.adler32_combine
.crc32_combine
.adler32
.crc_table
also in
4.1 · 4.0 · 3.4 · 3.2 · 3.1 · 3.0