Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decompress gzipped tile responses if no -ensure-gzip flag #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

spwoodcock
Copy link
Contributor

@spwoodcock spwoodcock commented Feb 7, 2025

Fixes #37

@iandees
Copy link
Member

iandees commented Feb 8, 2025

The code is like this because the mbtiles spec (and all mbtiles readers that I've used) expect to see the data gzipped if the tiles are pbf. Having said that, I agree that the flag's semantics make this change correct.

@spwoodcock
Copy link
Contributor Author

The code is like this because the mbtiles spec (and all mbtiles readers that I've used) expect to see the data gzipped if the tiles are pbf. Having said that, I agree that the flag's semantics make this change correct.

Ah yes, very good point!

Vector tiles need gzipped PBF, while raster mbtiles need non-gzipped PNG or JPEG.

Perhaps we can have conditional logic based on the mbtiles-format flag? If PBF, then keep compressed. If not, then decompress.

I'll update the code 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TMS server responses with Content-Encoding: gzip create invalid tiles (&mbtiles)
2 participants