I'm trying to set up this world map using SVGZ instead of SVG so I can give my users a richer, more detailed map.
So far I've tried depressing it using js-deflate, but to no avail.
I'm trying to set up this world map using SVGZ instead of SVG so I can give my users a richer, more detailed map.
So far I've tried depressing it using js-deflate, but to no avail.
Share Improve this question edited Dec 1, 2015 at 23:12 James A Mohler 11.1k15 gold badges50 silver badges76 bronze badges asked Sep 22, 2011 at 6:02 Badgeman 3000Badgeman 3000 811 silver badge9 bronze badges 2- SVGZ uses gzip for pressing. Browser doesn't depress SVG without assistance? – Andrew D. Commented Sep 22, 2011 at 6:27
- Please don't ask the same question over and over. Also, if you cannot ask a question without redirecting people to your website, then that question isn't acceptable here. – user1228 Commented Oct 18, 2011 at 11:40
3 Answers
Reset to default 5If you want the SVG file inside of the SVGZ, you gunzip it (it's a renamed archive):
cp file.svgz file2.svg.gz
gunzip file2.svg.gz
If you want to use a SVGZ image, then you might run into trouble. I think some browsers support it (virtually all support Gzip pression), but I doubt many do (if any at all).
As I write in ment SVGZ uses gzip
. Top browsers can depress gzip
files without assistance. Your page http://home.no/dwaynie/map load .svgz file with Content-Type:text/plain; charset=ISO-8859-1
. But for SVG
|SVGZ
it's not valid MIME type.
svg Content-Type: image/svg+xml
svgz Content-Type: image/svg+xml
Content-Encoding: gzip
Above headers must be configured in web server (IIS, Apache).
Just below the map on the page you refer to there's a link to Wikipedia that explains what it is: an SVG file pressed with gzip.
For pleteness sake: gzip and (pk)zip are not the same format, but Windows tools like WinRAR and 7-Zip understand gzip as well as zip. Every Linux distro probably has gzip/gunzip installed by default.