xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas DeWeese <Thomas.DeWe...@Kodak.com>
Subject Re: serialized applet
Date Mon, 20 Dec 2004 11:09:54 GMT
Hi Archie,

Archie Cobbs wrote:

> TJ Teegan wrote:
>> [..] you can take a loaded SVGDocument and write the DOM as a String.  
>> Then you can use the Deflater class in java.util.zip to compress it 
>> into a relatively small byte[].  To load it, use the Inflater class 
>> in java.util.zip and create a Document similar to the examples at 
>> http://xml.apache.org/batik/domapi.html#creating
> Along these lines, I didn't realize this at first but JSVGCanvas
> is perfectly happy loading an URL that points to a gzip'd SVG file.
> E.g., setURL("http://foo.com/myfile.svg.gz").

     Yes, this is part of the SVG specification.  The proper file
extension for this is 'svgz'.

> We've found that compresing the files makes load times a lot faster,
> because a nontrivial amount of time was spent just downloading the
> file over the net. Of course, SVG files compress very well, e.g. 90%.

    Yes, with gzip compression SVG files compare favorably with
many traditional binary vector formats.

To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org

View raw message