WebService compress data

  • Thread starter Wencheng Magiya
  • 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
 
J

Jani Järvinen [MVP]

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/
 
W

Wencheng Magiya

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/
 
W

Wencheng Magiya

Brendan, SharpZipLib is a good library, but I really need streaming
compression. Thanks anyway.
 
J

Jon Skeet [C# MVP]

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.
 
A

Aleksandar

Hello

It can be done using SharpZipLib (I did something similar with it).

Aleksandar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top