Deepak
Deepak

Reputation: 437

GZipInputSteam DeCompression did not work for a data of size more than 13239

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

Upvotes: 1

Views: 152

Answers (2)

Peter Lawrey
Peter Lawrey

Reputation: 533670

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.

Upvotes: 1

Aaron Digulla
Aaron Digulla

Reputation: 328724

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.

Upvotes: 1

Related Questions