I have a problem trying to decompress (in Java) a string that was compressed in Visual Basic, using DeflateStream. I did a little bit of research and saw and tried a lot of code that decompresses in Java using Inflater and InflaterOutputStream. None of the codes found succeeded. I looked over a lot of sites, and searched on google a lot of ways. I can say that the first 3-pages from google that concern java, inflater/deflater compression, visual basic, deflaterStream are already read, without success. I want to know if this thing is possible (and it should be since I have found a way of compressing/decompressing between Java and C# here : http://www.dreamincode.net/forums/topic/243808-compression-and-decompression-between-java-and-c%23/ )
I would also like to know if there are compatibility issues regarding Visual Basic DeflateStream and Java analog classes Inflater/Deflater. If someone had a similar problem I would highly appreciate also some code snippets.
Thanks,
Mihai
Ok, so I finally managed to solve this. It was a beginner error, but it took me long enough to solve it. The issue was represented by the fact that when I was reading the initial file (that was compressed and encrypted), I was keeping in memory the content of the file as a string, instead of reading directly the content as an array of bytes. And of course, some of the bytes were not supported by the string encoding and they were lost, and that is why the format of the compression was no recognized. The Inflater/Deflater classes from Java are compatible with the DeflateStream class from vb.net !
Thank you very much for your help and assistance.