### CRC32 Generation Function (C) Source: https://github.com/xiph/theora/blob/main/doc/draft-kerr-avt-theora-rtp-00.txt C function that computes the CRC32 checksum for Theora Setup Headers. It uses the polynomial X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0. Implementations SHOULD use this function; if not, the CRC32 value MUST be generated using the same polynomial. ```c unsigned int crc32 (int length, unsigned char *crcdata) { int index, loop; unsigned int byte, crc, mask; index = 0; crc = 0xFFFFFFFF; while (index < length) { byte = crcdata [index]; crc = crc ^ byte; for (loop = 7; loop >= 0; loop--) { mask = -(crc & 1); crc = (crc >> 1) ^ (0xEDB88320 & mask); } index++; } return ~crc; } ```