Re: Howto compress svg, that will then validate?

> If you're using Windows, then you can download cygwin...
Both in Windows and in other platforms there's (also) 7-zip available, which IMHO (and without the intent of marketing) provides the best Gzip compression available.

I just updated a quick comparison study between 7-zip [1] and GNU zip (gzip) [2] which I had done about a year. No compression improvements were achieved during this interval (obtained results using the updated are the same obtained with older versions).

Test file set consisted in 38 SVG files, slightly optimized already (XML comments removed, no indenting used). Best (known) compression settings were used for both tools.

Source: 2.114.523 bytes (100%)
gzip: 300.320 bytes (14,2%)
7-zip: 287.383 bytes (13,6%)

So, as a conclusion - or rule-of-thumb, as one may prefer - 7-zip seems to be best approach for one-shot file compression: for example, static files compressed once and uploaded to a server to be served thousands of times; gzip is a _lot_ faster and only looses one percent so it's recommended for a workflow-based and/or semi-automated process: for example, authoring tool + file conversion + file upload.

Versions:
7-zip - 4.44 and 4.57
gzip - 1.2.5 and 1.3.12

Windows script used was attached, for reference and/or feedback. Note that file extension needs to be renamed to ".cmd" or ".bat" in order to run (was renamed to ".txt" due to this extension being blocked by most mail clients/servers).

Hope this helps,

  Helder Magalhães

[1] http://www.7-zip.org/
[2] http://www.gzip.org/

Received on Tuesday, 22 April 2008 14:27:09 UTC