public static Entry readEntry(DataInput in) throws IOException {
    int type = DataInputOutputUtil.readINT(in);
    return switch (type) {
      case 0 -> new FileEntry(in, true);
      case 1 -> new DirectoryEntry(in, true);
      default -> throw new IOException("unexpected entry type: " + type);
    };
  }
public static Entry readEntry(DataInput in)