code: private static boolean isValidCrc(int checksum, ByteBuffer data, byte type) {
      if (checksum == 0 && type == 0) {
        return true;
      }
      Crc32c crc = new Crc32c();
      crc.update(type);
      crc.update(data.array(), 0, data.limit());
  
      return LevelDbConstants.unmaskCrc(checksum) == crc.getValue();
    }
docs: Validates that the {@link Crc32c} validates.
  
  @param checksum the checksum in the record.
  @param data the {@link ByteBuffer} of the data in the record.
  @param type the byte representing the {@link RecordType} of the record.
  @return true if the {@link Crc32c} validates.