views:

81

answers:

3

I've been using the Silverlight version of #ziplib (SharpZipLib) but it seems seriously flawed because the DeflateOutputStream always produces 2 bytes (120, 156) for any input (hell of a compression algorithm ;) so I cannot use that one. What's more it seems like that latest release is almost 2 years old now.

Any recommendation for a free (to be used in a commercial product) assembly that supports deflating streams?

Edit: The DotNetZip site says Silverlight support is deferred to the next release. Considering last *release* was last year and an alpha is in 'da hood' now we are likely to see something fruitful coming soon :)

A: 

Outside of Silverlight I prefer DotNetZip, however there is no Silverlight equivalent.

The only other alternative to the SharpZipLib for Silverlight is to Silverlight's own Zip file decompression. However its really just designed for accessing resources in Xaps.

AnthonyWJones
A: 

Use System.IO.Compression.GZipStream class

http://msdn.microsoft.com/en-us/library/system.io.compression.gzipstream.aspx

Pierre 303
-1: ... for Silverlight 4
Lasse V. Karlsen
I've just tested and your are right
Pierre 303
A: 

Pardon me, but I was wrong about Silverlight SharpZipLib. It works fine if you remember to call Flush and Close on the DeflateOutputStream. I was using a MemoryStream for backing so I could compress data that I would upload to server. Thinking the data was lost if the stream was closed I didn't do so on purpose. That was until I discovered byte[] MemoryStream.ToArray().

Zodiac Devoe