You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Thorbjørn Ravn Andersen <TR...@stibo.dk> on 2000/07/11 10:43:40 UTC
RE: Off-Topic: Is there any standard compressed ASCII format for
vali d XML documents?
> Is there any "standard" format for compressing XML files?
> I know that I could use GNU zip or so, but what I need is a simple (to
> compress and to uncompress) compression that produces ASCII format.
> If there is no standard, I'd propose a very simple solution.
Your solution means that it will not be valid XML anymore. XML was deliberately designed to be verbose and readable instead of compact.
> Background:
> A web server and a RDBMS are communicating over a 64k link,
> the link is shared with other application, so there is very
> low bandwidth.
> The RDBMS produces data in XML, the web server (i.e. Cocoon)
> uses style
> sheets
> to pretty-format everything.
> The RDBMS could produce data in ASCII-compressed XML in order
> to use less
> bandwidth, a modified DOM or SAX parser that consumes
> compressed XML should
> be easy to implement.
What is wrong with your own suggestion of using gzip or so? If you need plain ascii then use the MIME::Base64 encoding to get it.
I have large, highly redundant XML files. Gzip can compress to 1.5% of the original size, and bzip2 can compress to 0.5% of the original size (you would probably get less).
Another approach is building a virtual private network between the two endpoints and enable compression in _that_. That is easily done with ssh between two Unix-machines, and allow you to keep your software base unmodified.
Best regards,
--
Thorbjørn Ravn Andersen "...and...Tubular Bells!"