R: [protobuf] Re: Read multiple protobufs from single file
Hi Adam, thanks for you reply. Unfortunately neither ProtoBuf.js is able to support that use case. paolo Da: Adam Cozzette [mailto:acozze...@google.com] Inviato: martedì 24 ottobre 2017 23:21 A: Paolo Maria Mosconi <pmosc...@gmail.com> Cc: Protocol Buffers <protobuf@googlegroups.com> Oggetto: Re: [protobuf] Re: Read multiple protobufs from single file I don't know of any example code for doing this with our codebase in Javascript, but I did notice that ProtoBuf.js appears to have built-in support for this via the encodeDelimited and decodeDelimited methods described here: https://github.com/dcodeIO/ProtoBuf.js/ On Mon, Oct 16, 2017 at 9:56 AM, Paolo Maria Mosconi <pmosc...@gmail.com <mailto:pmosc...@gmail.com> > wrote: Hi, is there a sample node.js implementation for reading multiple streamed messages as described in https://developers.google.com/protocol-buffers/docs/techniques?csw=1#stre.? Thanks Il giorno giovedì 23 giugno 2011 17:55:37 UTC+2, mjs483 ha scritto: Hi, Is there any way to read a protobuf from a file input stream without consuming the entire file? Say for example if the file contains more than just one protobuf? I'd like to archive a stream of protobufs to a file for later analysis by simply writing them one after another to a single file with SerializeToOstream() in C++. However according to the documentation, ParseFromIstream() will always consume the entire file. Is there any way around this? Or is there not enough information in the encoded protobuf for this to be possible? -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com <mailto:protobuf+unsubscr...@googlegroups.com> . To post to this group, send email to protobuf@googlegroups.com <mailto:protobuf@googlegroups.com> . Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
Re: [protobuf] Re: Read multiple protobufs from single file
I don't know of any example code for doing this with our codebase in Javascript, but I did notice that ProtoBuf.js appears to have built-in support for this via the encodeDelimited and decodeDelimited methods described here: https://github.com/dcodeIO/ProtoBuf.js/ On Mon, Oct 16, 2017 at 9:56 AM, Paolo Maria Mosconiwrote: > Hi, > is there a sample node.js implementation for reading multiple streamed > messages as described in https://developers.google.com/ > protocol-buffers/docs/techniques?csw=1#stre.? > Thanks > > Il giorno giovedì 23 giugno 2011 17:55:37 UTC+2, mjs483 ha scritto: >> >> Hi, >> >> Is there any way to read a protobuf from a file input stream without >> consuming the entire file? Say for example if the file contains more >> than just one protobuf? >> >> I'd like to archive a stream of protobufs to a file for later analysis >> by simply writing them one after another to a single file with >> SerializeToOstream() in C++. However according to the >> documentation, ParseFromIstream() will always consume the entire >> file. Is there any way around this? Or is there not enough information >> in the encoded protobuf for this to be possible? > > -- > You received this message because you are subscribed to the Google Groups > "Protocol Buffers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to protobuf+unsubscr...@googlegroups.com. > To post to this group, send email to protobuf@googlegroups.com. > Visit this group at https://groups.google.com/group/protobuf. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
[protobuf] Re: Read multiple protobufs from single file
Hi, is there a sample node.js implementation for reading multiple streamed messages as described in https://developers.google.com/protocol-buffers/docs/techniques?csw=1#stre.? Thanks Il giorno giovedì 23 giugno 2011 17:55:37 UTC+2, mjs483 ha scritto: > > Hi, > > Is there any way to read a protobuf from a file input stream without > consuming the entire file? Say for example if the file contains more > than just one protobuf? > > I'd like to archive a stream of protobufs to a file for later analysis > by simply writing them one after another to a single file with > SerializeToOstream() in C++. However according to the > documentation, ParseFromIstream() will always consume the entire > file. Is there any way around this? Or is there not enough information > in the encoded protobuf for this to be possible? -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to this group, send email to protobuf@googlegroups.com. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
[protobuf] Re: Read multiple protobufs from single file
Kind of what I suspected. Alright, thanks! On Jun 23, 12:41 pm, Jason Hsueh jas...@google.com wrote: There's not enough information: seehttp://code.google.com/apis/protocolbuffers/docs/techniques.html#stre... On Thu, Jun 23, 2011 at 8:55 AM, mjs483 matt.shi...@gmail.com wrote: Hi, Is there any way to read a protobuf from a file input stream without consuming the entire file? Say for example if the file contains more than just one protobuf? I'd like to archive a stream of protobufs to a file for later analysis by simply writing them one after another to a single file with SerializeToOstream(output) in C++. However according to the documentation, ParseFromIstream(input) will always consume the entire file. Is there any way around this? Or is there not enough information in the encoded protobuf for this to be possible? -- 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 protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en. -- 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 protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.