* @param type The {@link RecordType} of the record, which is included in the
* checksum.
* @return the masked checksum.
*/
private int generateCrc(byte[] data, int off, int len, RecordType type) {
Crc32c crc = new Crc32c();
crc.update(type.value());
crc.update(data, off, len);
return (int) LevelDbConstants.maskCrc(crc.getValue());
}