Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

class method

Zlib.crc32

() -> ::Integer
(::String) -> ::Integer
(::String, ::Integer) -> ::Integer
Zlib.crc32(string, crc)

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.