The CRC16 checksum calculation is commonly used for error-checking purposes. The JavaScript function you provided is a CRC32 implementation, not CRC16. Here's a CRC16 implementation in JavaScript that matches a common CRC16-CCITT polynomial (0x1021) ...