如何DECOM在.NET瘪与java.util.zip.Deflater中的preSS流? [英] How to decompress stream deflated with java.util.zip.Deflater in .NET?
问题描述
我在 java.util.zip.Deflater中
转储(可以确认它是有效的,因为Java的充气
打开它很好),需要在.NET中打开它:
I have a dump after java.util.zip.Deflater
(can confirm it's valid because Java's Inflater
opens it fine) and need to open it in .NET:
byte[] content = ReadSample(sampleName);
var input = new MemoryStream(content);
var output = new MemoryStream();
using (var z = new System.IO.Compression.DeflateStream(input, CompressionMode.Decompress, true))
z.CopyTo(output);
这将引发
System.IO.InvalidDataException:块长度不相匹配的 补。
System.IO.InvalidDataException : Block length does not match with its complement.
尝试 Ionic.Zlib.DeflateStream
- 类似的异常。我怎样才能做到这一点?
Tried Ionic.Zlib.DeflateStream
- similar exception. How can i do that?
97 86 E8 92 47 3D 40 EA转储启动(如果该事项)。
The dump starts with 97 86 E8 92 47 3D 40 EA (if that matters).
更新:不幸的是,我有过的Java方无法控制的系统处于生产
Update: Unfortunately, i have no control over Java party as the system is in production.
推荐答案
既然你有过Java的输出无法控制,怎么样才能使用集成在.NET应用程序的一些J#的java.util .zip.Inflater
直接?请参见这个MSDN文章。
Since you have no control over the Java output, how about integrating some J# in your .NET app in order to use java.util.zip.Inflater
directly? See this MSDN article.
This similar question might also be helpful, particularly the suggestion of #zipLib.
这篇关于如何DECOM在.NET瘪与java.util.zip.Deflater中的preSS流?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!