0

I've been working on compression and decompression between Java and C#, using deflate and inflate. Everything else I tried produced varying results which were never able to be compressed/decompressed flawlessly between Java and C#.

I tested out using DeflateStream (C#) to compress data, and InflaterInputStream (Java) to decompress the data, and vice versa, which worked fine in my test.

However, when implementing the compression/decompression streams into the software I need it for, I get the following error in the Java app:

java.util.zip.ZipException: unknown compression method
 	at java.util.zip.InflaterInputStream.read(Unknown Source)

Can anyone help me out? Or are there any other ways to achieve what I'm trying to do?

1
Contributor
1
Reply
2
Views
7 Years
Discussion Span
Last Post by Kimpl
0

Nevermind I was doing something wrong. It doesn't work at all. Does anyone know any compression/decompression libraries/methods that are compatible with both C# and Java?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.