Open lseelenbinder opened 2 weeks ago
Is the goal here to convert MBTiles that use non-gzip compression, or to produce archives that use non-gzip compression?
The MBTiles spec is underspecified here (https://github.com/mapbox/mbtiles-spec/blob/master/1.3/spec.md#future-directions) and I don't know of any open source tilers that create archives outside of (no compression | gzip). So I'm not sure how generally applicable this feature / option is until we have a push towards supporting brotli or zstd across the PMTiles ecosystem.
The initial goal (and what this PR supports directly) is the first, but it opens the door for the second.
You're correct that MBTiles is underspecified, which is why we opted for a flag. We have internal tools that use brotli, and could conceivably used ZSTD when it has broader support. We'd also like to be able to convert gzip'ed mbtiles to other compressions in a single conversion step.
This adds the first step towards supporting additional tile compressions in the convert tool.
If a tile-compression flag is passed, then any compression other than gzip is passed-through as-is, assumed to be valid. Also sets the header compression flag as expected.