mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-02-04 10:51:07 +00:00
pmtiles-convert --gzip flag explicitly controls tile-level compression (default disabled) [#26]
This commit is contained in:
@@ -21,10 +21,6 @@ class Writer:
|
||||
self.leaves = []
|
||||
|
||||
def write_tile(self,z,x,y,data):
|
||||
# if the tile is GZIP-encoded, it won't work with range queries
|
||||
# until transfer-encoding: gzip is well supported.
|
||||
if data[0:2] == b'\x1f\x8b':
|
||||
data = gzip.decompress(data)
|
||||
hsh = hash(data)
|
||||
if hsh in self.hash_to_offset:
|
||||
self.tiles.append((z,x,y,self.hash_to_offset[hsh],len(data)))
|
||||
|
||||
Reference in New Issue
Block a user