Re: String compression
From: Nicholas Paldino [.NET/C# MVP] (mvp_at_spam.guard.caspershouse.com)
Date: 03/17/04
- Next message: mp: "Re: How I can sysnchronize changes in DataTable with my Database?"
- Previous message: cameron: "Re: Active Directory paging problem"
- In reply to: Ignacio Machin \( .NET/ C# MVP \): "Re: String compression"
- Next in thread: Ignacio Machin \( .NET/ C# MVP \): "Re: String compression"
- Reply: Ignacio Machin \( .NET/ C# MVP \): "Re: String compression"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 17 Mar 2004 09:11:48 -0500
There is a problem with this. If you want to still use Web Services,
then you will have to encode the binary attachments as base 64, or use DIME
(which is being deprecated as well). If you go the base64 route, whatever
binary you create is going to be represented in approximately 4/3 the size
of the original binary (larger), and that has to be wrapped in an XML
payload which is transmitted to the web service.
Basically, you will have to perform a calculation to determine if the
overall size of the payload is larger or smaller than what it would be
compressed, encoded, and wrapped in a call to another web service. Not
exactly the easiest of things.
To be honest, I think that the OP might have better luck optimizing the
performance of the code that the web service runs, instead of going this
route.
Also, it should be mentioned that there is a lot of talk regarding a
"binary infoset" for the purposes of efficiency.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:uRJBAYCDEHA.240@tk2msftngp13.phx.gbl...
> Hi,
>
> The best way of doing it would be create a ZIP and send the zip, now, I
> don;t think that you can send a binary stream using a webservice, if not
the
> the zip stream should be converted and sent as text. and then decompress
in
> the receiving, I think that this solution should be faster than sending
the
> XML per se, but there are better solutions like:
>
> 1- Using remoting with a binary encoding and the TcpChannel.
> 2- If you don;t wanna use remoting you can make a Tcp connection and send
> the binary stream.
>
> Now, you could also persist the stream to a file and then send this file
as
> many times as needed, this allow you to decouple the generation of the
data
> and the sending operation.
>
>
> Cheers,
>
> --
> Ignacio Machin,
> ignacio.machin AT dot.state.fl.us
> Florida Department Of Transportation
>
>
> "skg" <anonymous@discussions.microsoft.com> wrote in message
> news:3EB5E255-4FCB-424D-AFF1-77AF4A9DD78F@microsoft.com...
> > I'm looking for code on how to compress a (XML) string to send through a
> WebService. Due to the size of the data we are sending it takes an
> unacceptable amount of time to accomplish the task. If we can compress the
> string into a string then we can speed up the task and make eveyone happy.
>
>
- Next message: mp: "Re: How I can sysnchronize changes in DataTable with my Database?"
- Previous message: cameron: "Re: Active Directory paging problem"
- In reply to: Ignacio Machin \( .NET/ C# MVP \): "Re: String compression"
- Next in thread: Ignacio Machin \( .NET/ C# MVP \): "Re: String compression"
- Reply: Ignacio Machin \( .NET/ C# MVP \): "Re: String compression"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|