CRC32C(crc32, 0);
CRC32C(crc32, 0);
CRC32C(crc32, 0);
CRC32C(crc32, 0);
for (i = HEADER_LEN; i < len; i++)
CRC32C(crc32, buf[i]);
r = ~crc32;
b0 = r & 0xff;
b1 = (r >> 8) & 0xff;
b2 = (r >> 16) & 0xff;
b3 = (r >> 24) & 0xff;
crc32 = ((b0 << 24) | (b1 << 16) | (b2 << 8) | b3);
return crc32;
}