For example:
message Person { required string Name = 1; required int32 Id = 2; optional string Email = 3; } message Customers { repeated Person People = 1; } The idea here is that you define the record type (a single line in your CSV file) and then create a type that contains a "collection" of that record type In this case you define a record type for Person and then a message called Customers which is a "collection" of Person messages. Hope this helps. Timothy 2010/7/24 Julian González <julian....@gmail.com> > Do you have an example? because in my case I don't have all the samples at > a time I am processing the samples and then writing them into the file in > blocks of 256 samples every write call. > > 2010/7/23 <timothypa...@gmail.com> > > Just a quick reply as I'm about to leave. >> >> An easy solution is to encapsulate your message into another one where the >> first one is used as a repeated field. >> >> >> >> Sent from my BlackBerry® wireless device >> >> -----Original Message----- >> From: Julian González <julian....@gmail.com> >> Sender: protobuf@googlegroups.com >> Date: Fri, 23 Jul 2010 15:50:26 >> To: Protocol Buffers<protobuf@googlegroups.com> >> Subject: [protobuf] Multiple messages >> >> Hi, >> >> I am a newbie with Protocol Buffers I think I can use it in my >> application because right now I am using a CSV file and it takes a >> while to generate the file and also it is very big, I mean huge above >> 2 GB, so I thought switching to a binary format would be better I >> found protocol buffers, I really like it, it is easy and flexible but >> I could find how to write several messages of the same type in a >> single file. In my application I write samples, millions o samples and >> every sample contains like 6 different fields, I would like to use >> protocol buffer, but so far I could not find a way to write a read >> several messages. Can somebody help me? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Protocol Buffers" group. >> To post to this group, send email to proto...@googlegroups.com. >> To unsubscribe from this group, send email to >> protobuf+unsubscr...@googlegroups.com<protobuf%2bunsubscr...@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 proto...@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.