@Override
  public void close() throws IOException {
    out.close();
  }
Serialize all entries into bytes, choosing the # of leaf directories to ensure the header+root fits in 16 KB.

@param entries a sorted ObjectArrayList of all entries in the tileset.
@return byte arrays of the root and all leaf directories, and the # of leaves.
@throws IOException if compression fails
planetiler-core/src/main/java/com/onthegomap/planetiler/pmtiles/WriteablePmtiles.java