views:

92

answers:

1

I've got a compressed string of bytes coming out of a database which I need to decompress so as to retrieve the rtf file in there. This is the requirement.

I tried to use DotNetZip and it has given me a 50% success ratio. The failed 50% gave me a unsupported encryption (0x09, deflate64) error. So I think my problem is that some of the compressed string is compressed using deflate64 whilst some others are not. Don't know why.

I've found that zlib, DeflateStream and quite alot of free packages do not support deflate64. SevenZipSharp and KarnaCompression (port of Info-zip to C#) claim to support it however I keep getting errors from using both libraries.

SevenZipSharp gives me a "Data error" exception for which google has no answer, and KarnaCompression gives me some random exception "An attempt was made to load a program with an incorrect format" which i can't trace back to KarnaCompression.

Does anyone have a working example of using a library to decompress a deflate64 encoded file? Or can show me how to prove that my zip is NOT a deflate64 encoded file and something else?

Paying $700 for a Xceed licence is the last option.

+1  A: 

I had a similar problem to this.

My problem was that I was trying to call the unzip32.dll from a 64-bit exe.

Check this out: http://stackoverflow.com/questions/3036971/32-bit-dll-importing-in-64-bit-net-application

robbie
What are you talking about? What's the unzip32.dll?You are right though, I am developing on a 64bit system.
Joe
I was using Info-ZIP's UnZip DLL but I'm sure it's the same for every zip library.
robbie
I've finally solved the issue using SevenZipSharp. KarnaCompression's wrapping of Info-ZIP does not allow extract to stream only file.The problem as you rightly pointed to was that I was using the 32 bit version on my 64 bit app (built on Any CPU).Thanks for the hint.
Joe