Method: Cosmos::Crc#calc

Defined in:
lib/cosmos/utilities/crc.rb,
lib/cosmos/utilities/crc.rb

#calc(data, seed = @seed) ⇒ Integer

Calculates the CRC across the data buffer using the optional seed. Implemented in C for speed.

Parameters:

  • data (String)

    String buffer of binary data to calculate a CRC on

  • seed (Integer|nil) (defaults to: @seed)

    Seed value to start the calculation. Pass nil to use the default seed set in the constructor.

Returns:

  • (Integer)

    The CRC value



# File 'lib/cosmos/utilities/crc.rb', line 98