Crc32c (CRC32c v1.2.0)

the crc32c algorithm. It uses a rust nif.

Link to this section Summary

Functions

Calculate the CRC.

Calculate the CRC. It raises an Argument error if data is not binary

Link to this section Functions

@spec calc(binary()) :: {:ok, integer()} | {:error, :not_binary_data}

Calculate the CRC.

Expect binary data.

Examples

iex> Crc32c.calc(<<1, 2, 3, 4>>)
{:ok, 691047668}

iex> Crc32c.calc(5)
{:error, :not_binary_data}
@spec calc!(binary()) :: integer() | no_return()

Calculate the CRC. It raises an Argument error if data is not binary

Expect binary data.

Examples

iex> Crc32c.calc!(<<1, 2, 3, 4>>)
691047668