ok thanks. it is as it is.
(just looking at the feasibility of implementing the PB in Ada for my
own projects :-)
On Jun 23, 6:17 pm, Alek Storm <alek.st...@gmail.com> wrote:
> Hi etorri,
> Embedded messages and strings have the exact same wire format. When parsing
> a message, it's impossible to know whether you're parsing one or the other,
> and since strings have to be encoded using their length in bytes, we can't
> do something different for embedded messages.
> On Tue, Jun 23, 2009 at 9:06 AM, etorri <e...@torri.be> wrote:
> > Hello,
> > The "length delimited" encoding basically tells that the following N
> > bytes belong to this field. Wouldn't it be easier to instead use the
> > number of elements that belong to the embedded message (repeated
> > element).
> > Now (as far as I have understood) the message needs to be built from
> > fragments and then collected together as the lengths are not known
> > beforehand and it would be expensive to calculate the byte-length of
> > the embedded message.
> > Instead, it would be relatively inexpensive to calculate just the
> > number of following elements that make the embedded message before
> > starting to encode it.
> > This would enable streaming of PB or encoding and sending the elements
> > right as they are encoded.
> > Sorry if I misunderstood something. I have just started looking at BP.
> Alek Storm
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To post to this group, send email to email@example.com
To unsubscribe from this group, send email to
For more options, visit this group at