2

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 decompressing it using js-deflate, but to no avail.

James A Mohler
  • 11,060
  • 15
  • 46
  • 72
Badgeman 3000
  • 81
  • 1
  • 9
  • SVGZ uses gzip for compressing. Browser doesn't decompress SVG without assistance? – Andrew D. Sep 22 '11 at 06: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. –  Oct 18 '11 at 11:40

3 Answers3

4

If 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 compression), but I doubt many do (if any at all).

Blender
  • 289,723
  • 53
  • 439
  • 496
3

As I write in comment SVGZ uses gzip. Top browsers can decompress 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).

Andrew D.
  • 8,130
  • 3
  • 21
  • 23
0

Just below the map on the page you refer to there's a link to Wikipedia that explains what it is: an SVG file compressed with gzip.

For completeness 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.

fvu
  • 32,488
  • 6
  • 61
  • 79