Before WebServices were around, (and before VS.net), we had to put together
something that was basically a (pre-spec) web service. that is, we had to
post an xml string to a web server to invoke an action on the server that
involved posting a lot of data to a database.
We did it by building the XML message, zipping it, then base64 encoding the
zip. Then we embedded that base64-encoded string inside of a very simple
XML envelope. I wouldnt' bother for small messages, but if you're sending,
for example, a 1 meg collection of rows, it can be useful.
In those days we had to compress to file and then operate on the file.
However, I beleive that there are some .Net compression libraries (DynaZip,
for one) that support in-memory stream compression.
The downer is that with today's "real" web services, I would imagine that
you lose the automatic proxy generation and such -- that compressed, encoded
XML blob probably only looks like a string to WSDL.
skg said:
Can someone point me to some code (that functions) on how to compress
strings in C#. We need this to speed up out WebServices/MessageQueue
applications and so far what little code we found has not worked. A URL
would do nicely. Thanks.