Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compress SVG or Convert SVG to SVGz [closed]

Tags:

svg

svgz

Is there a way to compress SVG files?

I've been told that SVGz is the best way although I haven't found a converter to convert my SVG file.

Or is there an app where I can import an SVG file and export to SVGz?

like image 988
user1658756 Avatar asked Sep 17 '12 08:09

user1658756


People also ask

Do you need to compress SVG files?

If you need to transmit SVG files quickly, you may want to compress those files before sending them to make them easier and faster. compress is particularly important if you need to send several files at once since a large group of files can slow down your network or processing speed.

What is the difference between SVG and SVG compressed?

svg (plaintext SVG) and . svgz (compressed SVG) files are served with the same MIME type. The difference is in the Content-Encoding header, which combined with the Content-Type describes the type of content being served.


2 Answers

It uses GZip:

http://en.wikipedia.org/wiki/Scalable_Vector_Graphics#Compression

If you host SVG files on a web server, and have a properly configured web server, your web server will already compress files sent to the client, so compression of the SVG to SVGz is unnecessary (in fact undesirable).

To test whether your web server is configured correctly, refer to: How can I tell if my server is serving GZipped content?

like image 73
Andrew Alcock Avatar answered Oct 29 '22 15:10

Andrew Alcock


I know this is an older post but I thought it may be helpful to actually list out apps that can save in svgz format as per your request. Adobe Illustrator's Save As will allow you to save out to svgz format, as well as Inkscape, 7Zip, and if you are a fan of the command line and use windows this is a fairly simple solution GZip for Windows.

like image 21
Zanderi Avatar answered Oct 29 '22 15:10

Zanderi