class Digest::CRC32Mpeg

Implements the CRC32 Mpeg algorithm.

Constants

TABLE

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

XOR_MASK

Public Instance Methods

update(data) click to toggle source

Updates the CRC32 Mpeg checksum.

@param [String] data

The data to update the checksum with.
# File lib/digest/crc32_mpeg.rb, line 85
def update(data)
  data.each_byte do |b|
    @crc = ((@table[((@crc >> 24) ^ b) & 0xff] ^ (@crc << 8)) & 0xffffffff)
  end

  return self
end