tags:

views:

51

answers:

5

All,

I have a requirement to Compress an XML file. At the moment I am using C# and the gzip algorithm in the .NET Classes. I does compress it but not at the rate I would like to. For example a 12MB file was compressed to a little less than 4MB.

Is there any other way to compress it more than that? Speed of compression / decompression is not very important.

Thanks, M

A: 

You may try 7zip.

Darin Dimitrov
+2  A: 

ZIP compression is well suited for compressing XML data. In .NET you best rely on third party libraries:

0xA3
A: 

7-zip has an SDK.

Use the client version of 7-zip to try different compression settings to find the one with best compression for your particular data set.

Albin Sunnanbo
A: 

This website compared different compression libraries against large amount of text data. 7-zip is also included. I hope that this helps you to choose correct library that matches your requirements.

Tx3
A: 

Take a look at System.IO.Packaging.ZipPackage in WindowsBase. It's the .NET framework code behind the DOCX & XLSX file formats and these are more or less zipped XML files. You can zip multiple files of any format together, not just XML.

Enigmativity