pub struct CompactOptions {
pub deduplicate: bool,
pub sort_by_tile_id: bool,
pub preserve_metadata: bool,
}Expand description
Options controlling how compact_archive and
compact_archive_with_stats operate.
Fields§
§deduplicate: boolWhen true, tiles with identical byte content share a single physical
payload in the output archive. The builder already deduplicates by
FNV-1a hash; this flag additionally tracks duplicate dispatches so that
CompactStats::tiles_deduplicated is accurate.
When false, every tile is dispatched to the builder individually,
but the builder still deduplicates by content hash unless disabled.
Default: true.
sort_by_tile_id: boolWhen true, tiles are fed to the builder in ascending tile-ID order
(Hilbert-curve order), matching the PMTiles v3 clustered layout
recommendation. PmTilesReader::enumerate_tiles already returns
tiles sorted by tile ID, so enabling this flag is a no-op in practice;
it exists to document intent and allow future optimisations.
Default: true.
preserve_metadata: boolWhen true, the following header fields from the source archive are
propagated to the output archive:
- tile type
- zoom range (
min_zoom,max_zoom) - geographic bounding box (min/max lon/lat)
- centre longitude, latitude, and zoom
When false, the builder uses its own defaults (tile type Unknown,
zoom range 0–0, world bounding box).
Default: true.
Trait Implementations§
Source§impl Clone for CompactOptions
impl Clone for CompactOptions
Source§fn clone(&self) -> CompactOptions
fn clone(&self) -> CompactOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more