public static byte[] directoryToBytes(List<Entry> slice, int start, int end) {
    return directoryToBytes(start == 0 && end == slice.size() ? slice : slice.subList(start, end));
  }
Convert a range of entries from a directory to bytes.

@param slice a list of entries sorted by ascending {@code tileId} with size > 0.
@param start the start index to serialize, inclusive.
@param end   the end index, exclusive.
@return the uncompressed bytes of the directory.
planetiler-core/src/main/java/com/onthegomap/planetiler/pmtiles/Pmtiles.java