On Sep 6, 10:44 am, [EMAIL PROTECTED] wrote:
> Kenton Varda wrote:
> > Feel free to use the above code (note: hasn't been compiled or
> > tested).  I guess the question is whether or not this needs to be in
> > libprotobuf itself.
> I am in favor of putting some kind of delimited message format into the
> API, this is the requested feature.  This will keep people from being
> too creative and reinventing incompatible solutions to have delimited
> messages.  Such as the suggestions in this thread.

In my C# API I have a MessageStream (or something like that - I don't
have the source with me) which allows streaming by writing a sequence
of messages as if they were a repeated element with field 1 within a
container message. I then have a MessageStreamIterator which can
iterate through the messages in a stream in the obvious way.

The nice thing about this is that if you want to load everything in
one go, just create the virtual container message, and load that.

I agree that it would be nice to see this functionality in more
environments, agreeing it to be a common format for streaming. We
*could* add the flexibility of allowing the field number to be set on
both the iterator and the writer if that were deemed useful. I don't
think it would be good to mix message types within a stream, so just a
single number would suffice, perhaps defaulting to 1.


You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 

Reply via email to