<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Binary versus Xml Serialization size</title>
	<atom:link href="http://www.codewrecks.com/blog/index.php/2008/10/31/binary-versus-xml-serialization-size/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codewrecks.com/blog/index.php/2008/10/31/binary-versus-xml-serialization-size/</link>
	<description>Wrecks of code floating in the sea of Internet By Ricci Gian Maria</description>
	<lastBuildDate>Thu, 09 Feb 2012 16:15:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
	<item>
		<title>By: Santosh</title>
		<link>http://www.codewrecks.com/blog/index.php/2008/10/31/binary-versus-xml-serialization-size/comment-page-1/#comment-2635</link>
		<dc:creator>Santosh</dc:creator>
		<pubDate>Thu, 20 Aug 2009 07:46:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.codewrecks.com/blog/index.php/2008/10/31/binary-versus-xml-serialization-size/#comment-2635</guid>
		<description>And i guess this alkampfer&#039;s comparison is good with only small objects if the size of object increases, binary serializer would prove definitely better.</description>
		<content:encoded><![CDATA[<p>And i guess this alkampfer&#8217;s comparison is good with only small objects if the size of object increases, binary serializer would prove definitely better.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alkampfer</title>
		<link>http://www.codewrecks.com/blog/index.php/2008/10/31/binary-versus-xml-serialization-size/comment-page-1/#comment-2577</link>
		<dc:creator>alkampfer</dc:creator>
		<pubDate>Mon, 13 Jul 2009 13:11:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.codewrecks.com/blog/index.php/2008/10/31/binary-versus-xml-serialization-size/#comment-2577</guid>
		<description>Yes you are right, the problem in finding the best way to serialize data is to understand the type of data you are storing. Basically .net serializers does not compress the serialized output, but you can post compress it with gzip. Moreover XML serialization is really differnt from binary serialization, they are different techniques.

I think that if space is your primary problem, probably it is better to resort to some form of custom serialization with some custom compress algorithm, if space is not so vital, binary serialization is surely a good and simple solution to use, since it is natively implemented by .net.

alk.</description>
		<content:encoded><![CDATA[<p>Yes you are right, the problem in finding the best way to serialize data is to understand the type of data you are storing. Basically .net serializers does not compress the serialized output, but you can post compress it with gzip. Moreover XML serialization is really differnt from binary serialization, they are different techniques.</p>
<p>I think that if space is your primary problem, probably it is better to resort to some form of custom serialization with some custom compress algorithm, if space is not so vital, binary serialization is surely a good and simple solution to use, since it is natively implemented by .net.</p>
<p>alk.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ole - Andre</title>
		<link>http://www.codewrecks.com/blog/index.php/2008/10/31/binary-versus-xml-serialization-size/comment-page-1/#comment-2576</link>
		<dc:creator>Ole - Andre</dc:creator>
		<pubDate>Mon, 13 Jul 2009 11:59:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.codewrecks.com/blog/index.php/2008/10/31/binary-versus-xml-serialization-size/#comment-2576</guid>
		<description>Is this example incomplete?

The Test class only contains a string. It is not very compactable by the the binary formatter. Consider this:

float fValue = 46573847.5;
fValue binary size: 32bit

string sValue = &quot;46573847.5&quot;
sValue binary size: 8x10 = 80bit (minimum)

And then you have this:
string sValue = &quot;3&quot;
sValue binary size: 8x1 = 8bit (minimum)

Strings can&#039;t be compacted unless you compress them, so I think comparing these two methods using a single string is a bit wierd.

Am I in outer space?</description>
		<content:encoded><![CDATA[<p>Is this example incomplete?</p>
<p>The Test class only contains a string. It is not very compactable by the the binary formatter. Consider this:</p>
<p>float fValue = 46573847.5;<br />
fValue binary size: 32bit</p>
<p>string sValue = &#8220;46573847.5&#8243;<br />
sValue binary size: 8&#215;10 = 80bit (minimum)</p>
<p>And then you have this:<br />
string sValue = &#8220;3&#8243;<br />
sValue binary size: 8&#215;1 = 8bit (minimum)</p>
<p>Strings can&#8217;t be compacted unless you compress them, so I think comparing these two methods using a single string is a bit wierd.</p>
<p>Am I in outer space?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alkampfer</title>
		<link>http://www.codewrecks.com/blog/index.php/2008/10/31/binary-versus-xml-serialization-size/comment-page-1/#comment-2138</link>
		<dc:creator>alkampfer</dc:creator>
		<pubDate>Fri, 20 Mar 2009 09:31:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.codewrecks.com/blog/index.php/2008/10/31/binary-versus-xml-serialization-size/#comment-2138</guid>
		<description>I think that the problem arise because the client will try to use generated proxy class to deserialize the stream, and it does not find the original assembly on disk. What you need is to implement a SOAP extension (http://msdn.microsoft.com/en-us/magazine/cc164007.aspx) that will compress your message. (maybe someone had already did it)

this will make compression completely transparent process.

alk.</description>
		<content:encoded><![CDATA[<p>I think that the problem arise because the client will try to use generated proxy class to deserialize the stream, and it does not find the original assembly on disk. What you need is to implement a SOAP extension (<a href="http://msdn.microsoft.com/en-us/magazine/cc164007.aspx" rel="nofollow">http://msdn.microsoft.com/en-u.....64007.aspx</a>) that will compress your message. (maybe someone had already did it)</p>
<p>this will make compression completely transparent process.</p>
<p>alk.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mohid</title>
		<link>http://www.codewrecks.com/blog/index.php/2008/10/31/binary-versus-xml-serialization-size/comment-page-1/#comment-2136</link>
		<dc:creator>Mohid</dc:creator>
		<pubDate>Thu, 19 Mar 2009 07:18:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.codewrecks.com/blog/index.php/2008/10/31/binary-versus-xml-serialization-size/#comment-2136</guid>
		<description>Dear All,

Hope you all will be fine.

we are using Typed Datasets and Tables in our application. We get datatable from web service (application server) to bussiness layer at client side. data is becoming huge day by day and response from server to client is getting slow.
Now we want compressed data from webservice. 
what we did is to get datable in web service, serialize it and compress it using system.io.compression. no issue here in web service and we get the compressed data in business layer at client. The problem / issue occur when we de-serialize after decompress the array of bytes. we got 2 different errors they are

Unable to find assembly , version, culture......
End of Stream encountered before parsing was completed

please help in this regard
Mohid</description>
		<content:encoded><![CDATA[<p>Dear All,</p>
<p>Hope you all will be fine.</p>
<p>we are using Typed Datasets and Tables in our application. We get datatable from web service (application server) to bussiness layer at client side. data is becoming huge day by day and response from server to client is getting slow.<br />
Now we want compressed data from webservice.<br />
what we did is to get datable in web service, serialize it and compress it using system.io.compression. no issue here in web service and we get the compressed data in business layer at client. The problem / issue occur when we de-serialize after decompress the array of bytes. we got 2 different errors they are</p>
<p>Unable to find assembly , version, culture&#8230;&#8230;<br />
End of Stream encountered before parsing was completed</p>
<p>please help in this regard<br />
Mohid</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Again about differences about Binary versus Xml Serialization.</title>
		<link>http://www.codewrecks.com/blog/index.php/2008/10/31/binary-versus-xml-serialization-size/comment-page-1/#comment-1825</link>
		<dc:creator>Again about differences about Binary versus Xml Serialization.</dc:creator>
		<pubDate>Sat, 01 Nov 2008 07:44:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.codewrecks.com/blog/index.php/2008/10/31/binary-versus-xml-serialization-size/#comment-1825</guid>
		<description>[...] Binary versus Xml Serialization size [...]</description>
		<content:encoded><![CDATA[<p>[...] Binary versus Xml Serialization size [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alkampfer</title>
		<link>http://www.codewrecks.com/blog/index.php/2008/10/31/binary-versus-xml-serialization-size/comment-page-1/#comment-1823</link>
		<dc:creator>alkampfer</dc:creator>
		<pubDate>Fri, 31 Oct 2008 13:28:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.codewrecks.com/blog/index.php/2008/10/31/binary-versus-xml-serialization-size/#comment-1823</guid>
		<description>Yep, you are right, I always use binaryserialization if I need a raw way to store state of the object, but the original question was only about the size of generated serialization stream ;) so I want to show that it is possible to obtain smaller stream. 

I already told roberto that I use binary or soap if I need to use a raw storage system, not the Xml one.

Xml Serialization  as you explain is a really different stuff respect to binary or soap serialization, in fact it resides in System.Xml.Serialization while the Binary and soap formatters are in System.Runtime.Serialization giving you the real idea that they are real part of the runtime.

Thanks for the comment.

alk.</description>
		<content:encoded><![CDATA[<p>Yep, you are right, I always use binaryserialization if I need a raw way to store state of the object, but the original question was only about the size of generated serialization stream <img src='http://www.codewrecks.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  so I want to show that it is possible to obtain smaller stream. </p>
<p>I already told roberto that I use binary or soap if I need to use a raw storage system, not the Xml one.</p>
<p>Xml Serialization  as you explain is a really different stuff respect to binary or soap serialization, in fact it resides in System.Xml.Serialization while the Binary and soap formatters are in System.Runtime.Serialization giving you the real idea that they are real part of the runtime.</p>
<p>Thanks for the comment.</p>
<p>alk.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

