XML compression...

  • Thread starter Thread starter mkarim
  • Start date Start date
M

mkarim

I am looking for an algorithm I can use in C# that compresses small XML
documents. Is there a chance of losing some literal data on
decompression (as some claim)? How fast is the
compression/decompression process?

Thanks.
 
mkarim,

Why not use a standard zip algorithm (I know it's not called zip, but
that's what everyone knows it as). It should compress the document rather
nicely.

There are namespaces in .NET 2.0 that will assist you in this as well.

Hope this helps.
 
What are the namespaces are you talking about?

Is the compression/decompression quite fast?

Thanks.
 
You can check out the System.IO.Compression namespace.

As for how fast it is, since you said you are using small XML files, I
can't imagine it will take too long. You can test it for yourself, to see
if it suits your needs.
 
mkarim said:
I am looking for an algorithm I can use in C# that compresses small XML
documents. Is there a chance of losing some literal data on
decompression (as some claim)? How fast is the
compression/decompression process?

In addition to other comments, if you are using the 1.0 or 1.1 framework you
might take a look at SharpZipLib[1]

http://www.icsharpcode.net/OpenSource/SharpZipLib/Default.aspx

I find that BZip2 works quite well on XML.
 
Thanks.

I assume the process is quite fast for small XML documents and that
there is no possibility of losing any literal text? The XML documents
are used to generate reports.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top