WebService compress data

  • Thread starter Thread starter Wencheng Magiya
  • Start date Start date
W

Wencheng Magiya

Hi all,

My WebService connects to a database server, client application connects to
the WebService. There is a backup method in WebService backups database and
sends compressed data back to the client app. The client app then generates
a zip file using the compressed data. I tried Xceed's Zip library, it can do
the job well, but its price is kind of expensive. Is there any other
alternative method can compress data in memory?

Best Regards,
Wencheng
 
Wencheng,
There is a backup method in WebService backups database and sends
compressed data back to the client app. The client app then generates a
zip file using the compressed data. Is there any other alternative method
can compress data in memory?

I'm not aware of any ready-made compression utilities in .NET 1.1, but if
you are targeting .NET 2.0, then you might wish too look at the new
System.IO.Compression namespace. This is an alternative to the zip library
you have tried.

However, you might also wish to look at .NET's cryptography classes, as
encrypting data also (usually) compresses it implicitly. If this is an
option for you, then take a look at the classes in the
System.Security.Cryptography namespace.

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
(e-mail address removed)
http://www.saunalahti.fi/janij/
 
Thanks Jani, I will try .NET 2.0!

Jani J?vinen said:
Wencheng,


I'm not aware of any ready-made compression utilities in .NET 1.1, but if
you are targeting .NET 2.0, then you might wish too look at the new
System.IO.Compression namespace. This is an alternative to the zip library
you have tried.

However, you might also wish to look at .NET's cryptography classes, as
encrypting data also (usually) compresses it implicitly. If this is an
option for you, then take a look at the classes in the
System.Security.Cryptography namespace.

--
Regards,

Mr. Jani J?vinen
C# MVP
Helsinki, Finland
(e-mail address removed)
http://www.saunalahti.fi/janij/
 
Brendan, SharpZipLib is a good library, but I really need streaming
compression. Thanks anyway.
 
Wencheng Magiya said:
Brendan, SharpZipLib is a good library, but I really need streaming
compression. Thanks anyway.

You can do streaming compression with SharpZipLib. You can use
DeflaterOutputStream/InflaterInputStream, or
GZipInputStream/GZipOutputStream.
 
Back
Top