crc32.h

const uint32_t ouster::osf::CRC_BYTES_SIZE = 4

Size of the CRC field in a buffer

uint32_t crc32(const uint8_t *buf, uint32_t size)

Caclulate CRC value for the buffer of given size. (ZLIB version)

Parameters:
  • buf[in] Pointer to the data buffer.

  • size[in] Size of the buffer in bytes.

Returns:

CRC32 value

uint32_t crc32(uint32_t initial_crc, const uint8_t *buf, uint32_t size)

Caclulate and append CRC value for the buffer of given size and append it to the initial crc value. (ZLIB version)

Parameters:
  • initial_crc[in] Initial crc value to append to.

  • buf[in] Pointer to the data buffer.

  • size[in] Size of the buffer in bytes.

Returns:

CRC32 value