decompress deflate64 [closed]
Want to improve this question? Update the question so it focuses on one problem only by edi开发者_运维知识库ting this post.
Closed 3 years ago.
Improve this questionI'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.
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: 32 bit dll importing in 64 bit .Net application
SevenSharpZip is only a wrapper around the native 7zip dll. I prefer SharpZipLib as a pure .NET compression solution, however it doesn't support Deflate64. I had a crack at adding support but I'm to unfamiliar with their ZIP implementation. There is a standard but the different implementations are so different. I ended up using SevenSharpZip, however I did come across an error recently - I'm adding the ability to back up the archive before running operations, which I recommend to others.
精彩评论