code: 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());
    }
docs: Generates a CRC32C checksum using {@link Crc32c} for a specific record.
  
  @param data The user data over which the checksum will be generated.
  @param off The offset into the user data at which to begin the computation.
  @param len The length of user data to use in the computation.
  @param type The {@link RecordType} of the record, which is included in the
  checksum.
  @return the masked checksum.