On Feb 6, 5:56 pm, Joshua  Haberman <jhaber...@gmail.com> wrote:
> Does proto2 support event-based decoding?  That is, is there a parsing
> mode that calls user-specified callbacks when it encounters values/
> submessages/etc. rather than automatically putting all the data into
> an in-memory data structure?  If so, is this supported for both
> generated classes and .proto files that are loaded at runtime?
> Also, does it support streaming decoding?  That is, can you parse a
> partial protobuf (which may or may not end on a record boundary), then
> parse more data as more becomes available?
> I ask because I'm working on a minimalist C implementation that
> specifically targets these use cases.  I'm just curious if proto2
> supports these use cases too.
> I'm planning to finally release my implementation soon.  It's not
> ready yet, but for anyone who wants to check it out, see:
> http://github.com/haberman/pbstream

Neat stuff.  It would be very interesting to benchmark this against
generated Protocol Buffers deserialization code, which does use some
neat tricks (I love the fast-path code using gotos) but may suffer
performace-wise when you start processing nested messages and optional
fields that all end up on the heap.

Have you implemented the parser interface yet?  These functions
pbstream_init_parser and pbstream_parse are missing from the github
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 
For more options, visit this group at 

Reply via email to