CRC.crc_init

You're seeing just the function crc_init, go back to CRC module for more information.

Specs

crc_init(:crc_algorithm.params()) :: :crc_algorithm.resource()

Initialize a resource to be used for doing CRC calculations. The returned resource can be used with crc/2 or crc_update/2 to calculate CRC checksums.

Resource is created using the same params types that are used with crc/2:

  • atom's for compiled models
  • Map with model values
  • Map to extend a compiled model.

If used with crc/2 the returned resource can be re-used multiple times, but using a map or atom for a compiled model will likely be slightly more performant.

When using with crc_update/2 a new resource will be returned with every call that should be used to continue the calculation.