A.J
A.J

Reputation: 333

Using GZIP compression stream in android

I want to compress data in android devices and send it to an ASP.net server-side, but I don't want to consume much power and sacrifice device resources. I've tried compressing data using Deflate stream on android-side and decompressing using the same stream on the server side, but the decompressed string was not the same as the original one. I tried then using GZIP stream and the recovered data was the same as the original one. As I read, Deflate stream is faster than GZIP. So what should I do? Is it the best practice to use GZip stream for data compression and decompression between Android and C#? Is there a way to recover data that is compressed using Deflate stream?

Upvotes: 0

Views: 598

Answers (1)

Wanton
Wanton

Reputation: 840

Try using DotNetZip (NuGet) instead of System.IO.Compression.GZipStream.

Upvotes: 1

Related Questions