On Fri, Apr 3, 2009 at 2:40 AM, ShirishKul <shirish...@gmail.com> wrote:
> I found that for a typical data to be transferred across the wire for
> size of 500KB that a XML file would represent has corresponding file
> size as 300KB for PB binary and around 130KB for XML Fast Infoset
> binary file.
What kind of data were you encoding?
I'm guessing you enabled some kind of compression for the FI encoding? Note
that protocol buffers, while compact, do not actually apply any sort of
compression themselves. For repetitive data or data containing a lot of
text strings, applying zlib compression to the encoded message can make it
> Timings to parsing and serializing is extremely good for Protocol
(Don't forget to use optimize_for = SPEED if performance is important --
this will be the default in the next version.)
What makes a difference if we consider XML fast infoset binary against
> PB binary in terms for Sizes, speed to parse them up etc.?
I don't actually know much about FI. My guess based on reading some
descriptions of FI is that PB is similar to FI's non-self-describing,
no-compression mode. I would also guess that because XML is a much more
complicated format than protocol buffers, FI probably has more overhead when
encoding simple structured data, especially number-heavy data. For
string-heavy data, though, XML works pretty well and so this overhead may
not be an issue in that case.
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To post to this group, send email to firstname.lastname@example.org
To unsubscribe from this group, send email to
For more options, visit this group at