views:

57

answers:

2

Hi,

I have created compression and decompression technique using GZipinputstream in both c#.NET and Java. If I compress up to 13239 bytes in c#.NET then i can decompress it in Java but if I compress more than 13239 bytes in c#.NET then i am not able to decompress it in Java. But I can decompress it using C#.NET. Any ideas what could be causing this?

Thanks Bapi

+1  A: 

Flush the stream before closing it / trying to read it from the Java side. My guess is that you hit some kind of buffer and not all data is transfered.

Aaron Digulla
+1  A: 

I suggest you try compressing with gzip, gunzip to see where the cause of the problem is.

I have compressed and decompressed much larger files with Java, and these worked correctly with the utilities as well.

Peter Lawrey