public static Checkpoint deserialize(DataInputStream stream) throws IOException {
    byte typeNum = stream.readByte();
    CheckpointType type = CheckpointType.valueOf(typeNum);
    if (type == null) {
      throw new IOException("unrecognized checkpoint type " + typeNum);
    }
    int cnt = stream.readInt();
    List<MemTableInfo> memTableInfos = new ArrayList<>(cnt);
    for (int i = 0; i < cnt; ++i) {
      MemTableInfo memTableInfo = MemTableInfo.deserialize(stream);
      memTableInfos.add(memTableInfo);
    }
    return new Checkpoint(type, memTableInfos);
  }
Checkpoint is the basic element of .checkpoint file, including type, number of memTables, and
brief information of each memTable.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/wal/checkpoint/Checkpoint.java