martin/martin-mbtiles
Yuri Astrakhan 3fcad46500
fix (re-)compression of images (#579)
Compression middleware turned out to be hard to use for image cases - it
simply looks at the content-encoding, and if not set, tries to compress
if accepted by the client.

Instead, now individual routes are configured with either that
middleware, or for tiles, I decompress and optionally recompress if
applicable.

Now encoding is tracked separately from the tile content, making it
cleaner too. Plus lots of tests for mbtiles & pmtiles.

Fixes #577
2023-02-20 10:44:22 -05:00
..
fixtures/invalid Add .mbtiles support (#549) 2023-01-09 00:10:23 -05:00
src fix (re-)compression of images (#579) 2023-02-20 10:44:22 -05:00
.env Add .mbtiles support (#549) 2023-01-09 00:10:23 -05:00
Cargo.toml Add .mbtiles support (#549) 2023-01-09 00:10:23 -05:00
README.md Add .mbtiles support (#549) 2023-01-09 00:10:23 -05:00
sqlx-data.json Add .mbtiles support (#549) 2023-01-09 00:10:23 -05:00

Development

# To update sqlx files, first install sqlx-cli:
cargo install sqlx-cli --no-default-features --features sqlite,native-tls

# Prepare DB schema (from the ./mbtiles dir)
cargo sqlx prepare --database-url sqlite://$PWD/fixtures/geography-class-jpg.mbtiles