public static int getChunkChecksum(int chunkTypeId, byte[] buffer, int offset, int length)
{
// Compute the crc of the record type and the payload.
PureJavaCrc32C crc32C = new PureJavaCrc32C();
crc32C.update(chunkTypeId);
crc32C.update(buffer, offset, length);
return crc32C.getMaskedValue();
}
}