Re: [svg-developers] Compressin SVG
----- Original Message -----
From: "Ben" <crane_ba@...>
Sent: Tuesday, January 13, 2004 7:56 AM
Subject: [svg-developers] Compressin SVG
> Hi all,
> I now have a SVG file of 2.9mb, with over 90000 lines of code. The
> SVG drawing looks great but with so much animation to do its slow. I
> have heard of SVGZ which compresses SVG files to 25% of their
> original size. Where do I find a tool to create SVGZ files and since
> I'm running the file off my C: drive, I hope there won't be a problem
> with getting the Adobe SVG viewer to run the compressed file?
I expect this has been answered allready but you simply use gzip (which you
can download for free) and change the extension to svgz. Both the Adobe and
Corel viewers can disply this.
> Also, with the compression in effect, will that make the actual SVG
> code run quicker?
> Are there other ways to enhance the speed of SVG animation/effects on
> extremely large files? I need a little help with this.
Try to reduce redundancy but using classes, g and use elements. If you've
generated you file using some WYSIWYG editor, it probably contains some
unnecessary stuff that can be deleted. Using relative, instead of absolute
values in d attributes should reduce the file size but it's a pain to work
out (is there a formula for this?). Try to find anything that you can't see
and delete it. Remove unnecessary junk like whitespace and comments.
Remove spaces or comers before letters and - signs in d attributes. I
suggest you do this on a copy as it makes you file hard to edit. I've
written a python script to do this which I'll try to upload to the internet
in the near future.
Richard Pearman http://www.nucleus.com/~richardp/