class Digest::CRC32c

Implements the CRC32c algorithm.

Constants

TABLE

Generated by ‘./pycrc.py –algorithm=table-driven –model=crc-32c –generate=c`

Public Instance Methods

update(data) click to toggle source

Updates the CRC32 checksum.

@param [String] data

The data to update the checksum with.
# File lib/fluent/plugin/digest/crc32c.rb, line 98
def update(data)
  data.each_byte do |b|
    @crc = (((@crc >> 8) & 0x00ffffff) ^ TABLE[(@crc ^ b) & 0xff])
  end
  return self
end