views:

95

answers:

2

I have an XML file format .zfo that is compressed using zip algorithm. I need to remove this compression from the file, so that it is in usable XML form.

How can I remove this compression, or decompress this XML file?

Its not like you might imagine i.e: .zip file containing an xml file. Instead the byte[] thats written to the file is zip compressed.

Thanks in advance.

+1  A: 

Check out DotNetZip (http://www.codeplex.com/DotNetZip)--it probably does what you need (e.g., DeflateStream).

A zip file contains meta-data (file and directory structure) as well as the actually compressed data. It sounds like your file only has the compressed data. DotNetZip should be able to handle both.

ShellShock
Unfortunately it expects a traditional zip file structure. My file is not a zip, but the contents are compressed using zip algorithm
JL
ZIP isn't aan algorithm. ZIP is a file format. The compression algorithm used within most zip files is DEFLATE. That's what the DeflateStream handles - a raw bytestream that has been deflated.
Cheeso
+1  A: 

That file isn't zip compressed at all. It appears to be some xml that's embedded in a certificate, issued by the Czech Post Office. The actual message looks to be encoded in some kind of base64 variant.

Call your post office.

Hans Passant