Re: Bit fields in protocol buffer

2009-05-08 Thread Henner Zeller
On Fri, May 8, 2009 at 5:50 AM, Peter K. koots...@gmail.com wrote: Hi, I'm not a PB expert, but I don't believe that the basic types support bitfields. One way to do it is to just expand each bitfield into a uint32. fixed32 or fixed64 would be probably better. uint32 is encoded in

Re: Bit fields in protocol buffer

2009-05-08 Thread Henner Zeller
On Fri, May 8, 2009 at 2:06 PM, Kenton Varda ken...@google.com wrote: On Fri, May 8, 2009 at 9:03 AM, Henner Zeller h.zel...@acm.org wrote: fixed32 or fixed64 would be probably better. uint32 is encoded in variable length which would make bitfields typically larger than necessary

Re: string vs. bytes

2009-05-10 Thread Henner Zeller
On Sun, May 10, 2009 at 6:08 AM, edan edan...@gmail.com wrote: I have some fields that may contain non-UTF8 data. I understand that I just need to change their type from string to bytes and it should just work, transparently. yes. The're the same on the wire. I have a few fields that

Re: string vs. bytes

2009-05-12 Thread Henner Zeller
. Otherwise, then the word ERROR on the output might be a bit too strong. If anybody can clarify, I'd be very grateful. Dan On May 10, 5:59 pm, Henner Zeller h.zel...@acm.org wrote: On Sun, May 10, 2009 at 6:08 AM, edan edan...@gmail.com wrote: I have some fields that may contain non-UTF8 data. I

Re: 2.1.0 release is up

2009-05-13 Thread Henner Zeller
Thanks for releasing! On Wed, May 13, 2009 at 4:04 PM, Kenton Varda ken...@google.com wrote: http://code.google.com/p/protobuf/downloads/list Aaaand, I just realized that CHANGES.txt still has the release date as .  :( /me is not very good at release engineering. Good enough, these

Re: Cross-compile of Google Protocol Buffers fails

2009-05-15 Thread Henner Zeller
Hi Reid, I guess Kenton would be happy about a patch as well, seems you already know where to look. That is the nice thing about OpenSource: you can contribute and have the case you care about fixed as opposed to closed source where you hope that it is on the someones' agenda. Get involved. -h

Re: /usr/include/google/protobuf/stubs/once.h: undefined reference to `pthread_once'

2009-06-04 Thread Henner Zeller
sounds like linking the pthread library is missing. Add -lpthread to your linker options. On Thu, Jun 4, 2009 at 1:27 PM, Carmen carmen.navarr...@gmail.com wrote: Hi all, I'm just having some errors when compiling my first .proto file. I made the .proto and compile it with protoc and all

Re: speed option for code generation

2009-06-08 Thread Henner Zeller
Hi, On Mon, Jun 8, 2009 at 2:03 PM, wayne.mene...@gmail.com wrote: Hi, Can anyone tell me what are the caveats of using the option optimize_for = SPEED; during code generation? The documentation says it can improve parsing and serialization. But what are the cons of using this? Mostly it

Re: Use of repeated

2009-06-17 Thread Henner Zeller
On Tue, Jun 16, 2009 at 7:48 PM, skshe...@gmail.comskshe...@gmail.com wrote: I am experimenting with repeated fields my dot-proto is as follows: message Foo {    required string     name        = 1;    optional int32      id             = 2;    optional int32      num             = 3;    

Re: Endian

2009-08-14 Thread Henner Zeller
On Fri, Aug 14, 2009 at 8:28 AM, DavePpelow...@pelowitz.com wrote: I quickly reviewed the documentation and the faq and found no reference to the protocol demanding big endian or little endian or associated byte order conversion.  Does the protocol require one or the other?  Alternately,

Re: How to write a protocol buffer message which correspond to java.util.Map

2009-08-26 Thread Henner Zeller
2009/8/26 Alkis Evlogimenos ('Αλκης Ευλογημένος) evlogime...@gmail.com: Protocol buffers do not have a protobuf map equivalent. What is usually done is to put 2 repeated fields in the proto, one for the keys and one for the values of the map you are trying to represent. Or a repeated embedded

Re: Example produces error.

2009-08-29 Thread Henner Zeller
And yeah, documentation needs to be fixed. On Aug 28, 2009 1:35 PM, Omnifarious omnifari...@gmail.com wrote: An example from http://code.google.com/apis/protocolbuffers/docs/proto.html produces an error when fed into protoc: $ protoc example.proto --cpp_out=. example.proto:8:20: Expected {.

Re: protoc feature question

2009-09-10 Thread Henner Zeller
Hi, On Thu, Sep 10, 2009 at 4:16 PM, George Georgiev georgi.georg...@citrix.com wrote: Hi, Is there a way to tell to protoc to recompile the files only if the output files are missing or are older than the input file? Isn't this what makefiles are for ? -h

Re: protoc feature question

2009-09-10 Thread Henner Zeller
local version of protoc (say, switched on with a commandline flag) and send a patch to this list for review and to be integrated in the mainline. -h Thanks -Original Message- From: henner.zel...@googlemail.com [mailto:henner.zel...@googlemail.com] On Behalf Of Henner Zeller Sent

Re: protoc feature question

2009-09-10 Thread Henner Zeller
Hi, On Thu, Sep 10, 2009 at 4:51 PM, Kenton Varda ken...@google.com wrote: On Thu, Sep 10, 2009 at 4:36 PM, Henner Zeller h.zel...@acm.org wrote: Hi, On Thu, Sep 10, 2009 at 4:26 PM, George Georgiev georgi.georg...@citrix.com wrote: Sure, but it is really hard for me to prepare something

Re: Ability to iterate a descriptor pool.

2009-09-22 Thread Henner Zeller
Hi, On Tue, Sep 22, 2009 at 15:39, Exaurdon alexrichard...@gmail.com wrote: Summary: I would really like to be able to iterate through the message descriptors in a DescriptorPool, in particular the generated_pool. I am sending various protocol buffers as messages across a transport. On the

Re: mutable

2009-09-23 Thread Henner Zeller
Hi, On Wed, Sep 23, 2009 at 08:13, jayt0...@gmail.com jayt0...@gmail.com wrote: I am having trouble accessing many members of my .proto file.  It seems that compound members are not accessible with set_() method calls.  I saw in your example code the use of mutable_() calls. What does this

Re: mutable

2009-09-23 Thread Henner Zeller
 Bar bar_message;  bar_message.mutable_bar()-CopyFrom(foo_message); .. and that should of course be a bar_message.mutable_foo()-CopyFrom(foo_message); -h --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Protocol

Re: mutable

2009-09-23 Thread Henner Zeller
/apis/protocolbuffers/docs/reference/cpp/google.protobuf.message.html .. and the tutorial mentions them as well, but not with an example http://code.google.com/apis/protocolbuffers/docs/cpptutorial.html On Sep 23, 8:25 am, Henner Zeller h.zel...@acm.org wrote: Hi, On Wed, Sep 23, 2009 at 08:13

Re: mutable

2009-09-23 Thread Henner Zeller
); This is the concept of what I'm trying to do. Yeah, that will work with CopyFrom() msg_foo2.mutable_stuff1()-CopyFrom(foo1); On Sep 23, 8:25 am, Henner Zeller h.zel...@acm.org wrote: Hi, On Wed, Sep 23, 2009 at 08:13, jayt0...@gmail.com jayt0...@gmail.com wrote: I am having trouble

Re: mutable

2009-09-23 Thread Henner Zeller
.  You are a life saver... Jay On Sep 23, 8:47 am, Henner Zeller h.zel...@acm.org wrote: On Wed, Sep 23, 2009 at 08:45, jayt0...@gmail.com jayt0...@gmail.com wrote: message foo1 {   optional int32 value1 = 1;   optional int32 value2 = 2; } message foo2 {   optional foo1 stuff1 = 1

Re: mutable

2009-09-23 Thread Henner Zeller
, Henner Zeller h.zel...@acm.org wrote: Hi, On Wed, Sep 23, 2009 at 08:13, jayt0...@gmail.com jayt0...@gmail.com wrote: I am having trouble accessing many members of my .proto file.  It seems that compound members are not accessible with set_() method calls.  I saw in your example

Re: extension_set.h can not be resolved by xlc + + properly

2009-09-25 Thread Henner Zeller
Maybe 'Free' is a macro defined in that compiler environment ? (would be bad, but these things happen). What happens if you do an #undef Free in front of that On Fri, Sep 25, 2009 at 07:25, alex as.von.ch...@gmail.com wrote: hi when i #include google/protobuf/extension_set.h the xlc++

Re: warnings compiling generated code on Snow Leopard

2009-09-25 Thread Henner Zeller
On Fri, Sep 25, 2009 at 12:25, mo mohammad.kolahdou...@gmail.com wrote: So is there a decision for this issue? Will it be a flag for protoc or a patch (I think I saw somewhere a post mentioning that the patch was not going to be used because of other issues)? And any possible ETA for the

Re: protobuf-2.2.0 java compilation errors

2009-09-25 Thread Henner Zeller
regionStart() is there since JDK 1.5 http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Matcher.html#regionStart() What is your java version ? On Fri, Sep 25, 2009 at 15:54, matt matt.hender...@lucidsw.com.au wrote: I have compiled C++ protobuf successfully but am having enormous

Re: protobuf-2.2.0 java compilation errors

2009-09-25 Thread Henner Zeller
is set for 1.5 but it still uses a 1.4 jre.jar somewhere ? IIRC, there is a tab somewhere to figure out what 'system jars' it includes in the project. Henner Zeller wrote: regionStart() is there since JDK 1.5  http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Matcher.html#regionStart

Re: Can serialized messages be used reliably as keys?

2009-09-29 Thread Henner Zeller
On Tue, Sep 29, 2009 at 12:41, alopecoid alopec...@gmail.com wrote: Given that the serialized bytes have to be able to *deserialize* back to the original messages, surely if those original messages aren't equal, the serialized forms would have to be different too - assuming we're talking

Re: arrays??

2009-10-08 Thread Henner Zeller
Hi,  This is exactly what I've done before putting arrays into a string.  When I've implemented arrays via repeated fields, the program was even slower,  and the file size was too large (compare to Java serialization mechanism+ zip). If you put the values in a string and do you own array

Re: arrays??

2009-10-08 Thread Henner Zeller
Hi, On Thu, Oct 8, 2009 at 10:57, sergei175 sergei...@googlemail.com wrote:  Ok, this is a simple example of proto buffers file.  I want to write 1000 Records. Each record has its name and NamedArray  Each array has its name and a set of double numbers,  For my example,  I've filled array

Re: Generating.proto files from java source file

2009-10-08 Thread Henner Zeller
On Thu, Oct 8, 2009 at 11:32, Kenton Varda ken...@google.com wrote: Yikes.  That's kind of like someone left you with just .class files without the .java files. If you look at the code, though, you will notice that there are comments in it defining each field, like:   // optional int32 i =

Re: Java compiler warning

2009-10-09 Thread Henner Zeller
On Fri, Oct 9, 2009 at 01:16, Jesper jesper.eskil...@gmail.com wrote: The Eclipse Java compiler issues a warning about a raw type: Description     Resource        Path    Location        Type GeneratedMessage.ExtendableMessage.ExtensionWriter is a raw type. References to generic type

Re: [protobuf] Re: why protobuf optional field does not take null

2009-11-30 Thread Henner Zeller
Hi, On Mon, Nov 30, 2009 at 15:16, dp decimusphos...@gmail.com wrote: Is this still true? Or is there some way to tell PB that a field can potentially have null values? No change here. Problem is that 'null' and 'cleared' are semantically different things. Sometimes in the software world

Re: [protobuf] Re: Java -using GPB -which type of stream should I be using over sockets?

2009-12-02 Thread Henner Zeller
On Wed, Dec 2, 2009 at 12:31, Nigel Pickard pickard.ni...@gmail.com wrote: Jason -do you mean any Java output stream type will work (as all Java IO stream types ultimately use bytes), and that the byte stream produced will have the bytes put in an accepted standard order by the writeTo method?

Re: [protobuf] Re: Java -using GPB -which type of stream should I be using over sockets?

2009-12-02 Thread Henner Zeller
Are your ObjectOutputStreams transparent ? Or do they prepend/append things to the data ? On Wed, Dec 2, 2009 at 13:11, Nigel Pickard pickard.ni...@gmail.com wrote: Oh, wait So I have a test Java app where one thread is running as a server, one as a client. I've been sending a GPB defined

Re: [protobuf] Re: Java -using GPB -which type of stream should I be using over sockets?

2009-12-02 Thread Henner Zeller
changed has been the input stream type on the client. Basically, on the client side I called the GPB object's parseFrom method with the DataInputStream.as an argument and expected it to work but got that error message. On Dec 2, 4:17 pm, Henner Zeller henner.zel...@googlemail.com wrote

Re: [protobuf] Re: protoc plugin compiler extension framework

2009-12-22 Thread Henner Zeller
Hi, On Tue, Dec 22, 2009 at 06:42, Christopher Piggott cpigg...@gmail.com wrote: Hmm maybe I can use the UninterpretedOption message to do this. Would something like this work? message ChrisMessage {  option javadoc = This is an object representing Chris's Message;  repeated int32 field1 = 1

[protobuf] Thinking of implementing: extract documentation in .proto file and store in FileDescriptorProto

2009-12-22 Thread Henner Zeller
Hi, Since this question came up earlier today and I have this anyway on my TODO list, I think this is as well some nice side project for the holidays I could work on ;) Basically, there are two forms of comments typically found for messages and fields: block comments in front of the declaration

Re: [protobuf] Re: Thinking of implementing: extract documentation in .proto file and store in FileDescriptorProto

2009-12-22 Thread Henner Zeller
Hi, On Tue, Dec 22, 2009 at 15:00, Christopher Piggott cpigg...@gmail.com wrote: On Dec 22, 4:53 pm, Henner Zeller henner.zel...@googlemail.com wrote:   /*    * some block comment    */   int32 some_field = 1;   int32 some_other_field = 2;  // short comment. I would be fine

Re: [protobuf] Thinking of implementing: extract documentation in .proto file and store in FileDescriptorProto

2009-12-22 Thread Henner Zeller
.. alright, will spend some time tomorrow implementing things. -- 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

Re: [protobuf] How to assign a singel nested object value in C++?

2009-12-29 Thread Henner Zeller
On Tue, Dec 29, 2009 at 11:11, Nigel Pickard pickard.ni...@gmail.com wrote: I'm having a problem working out how to assign a nested object's value in C++ (my Java version works fine).  E.g. in the proto file for my car object I define:  import mycustomengine.proto;  message MyCar {  

Re: [protobuf] C++ Parsing and de-serialization

2010-01-17 Thread Henner Zeller
Hi, On Sun, Jan 17, 2010 at 13:21, Johan freddielunchb...@gmail.com wrote: Hi, I read data messages that comes in on a TCP/IP socket. These message can be of different types example Person, Project etc, that I have defined and the corresponding .proto files. I can do:    string

Re: [protobuf] PB parsing with empty/reset values

2010-02-05 Thread Henner Zeller
Hi, On Fri, Feb 5, 2010 at 08:43, Hershiv Haria darkmaste...@gmail.com wrote: Hi all, I have an odd issue at the moment. I am sending a PB from an android app to an app engine server, using Java. My app is being used to store files online, and I use the PB to send the file name, destination,

Re: [protobuf] Sorting protocol buffer messages.

2010-02-15 Thread Henner Zeller
Some random idea: repeated fields support stl-style iterators; should be possible to use regular std::sort() on it with a custom functor. You probably can hide a lot of code complexity by writing such functors and avoiding runtime complexity by keeping stuff sorted, indeed. On Sun, Feb 14, 2010

Re: [protobuf] Invitation to connect on LinkedIn

2010-02-22 Thread Henner Zeller
of coffee. -h On Mon, Feb 22, 2010 at 4:28 PM, Henner Zeller henner.zel...@googlemail.com wrote: Wow, that elevates protocol buffers to be a real person ;) -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send

Re: [protobuf] Fudge proto project

2010-02-28 Thread Henner Zeller
On Sun, Feb 28, 2010 at 09:13, Adewale Oshineye adew...@gmail.com wrote: Hi all, Have you seen this: http://www.fudgemsg.org/display/FDG/Fudge+Proto which claims to be compatible with the syntax of protobufs but use different on-disk and on-the-wire representations? Looks like they fell into

Re: [protobuf] How to send classes defined in proto over a socket

2010-03-12 Thread Henner Zeller
You're trying to send the raw C++ memory representation of a protocol object send(socket, data_snd, sizeof(data_snd), 0) That doesn't work. And is the reason why protocol buffers are there in the first place: they provide serialization techniques. You need to use the serialization methods that

Re: [protobuf] Re: How to send classes defined in proto over a socket

2010-03-12 Thread Henner Zeller
On Fri, Mar 12, 2010 at 10:20, mk apollo...@gmail.com wrote: Thanks for reply !! Could you please give an example? I tried several ways from this morning but  as I am a new user of protbuf, I don't see what way to follow ... Thanks! Have a look at the documentation, it is full of examples

Re: [protobuf] Re: Please help with serialization/deserialization of classes defined in .proto

2010-03-12 Thread Henner Zeller
Reconsider having a look at your code and ask yourself the following questions - what are the input/output streams connected to. Is it the socket ? - what do you send over the socket ? Is it the data coming from a SerializeTo*() method of the protocol buffer ? Trial and Error programming just

Re: [protobuf] signing protobuf messages

2010-03-18 Thread Henner Zeller
On Thu, Mar 18, 2010 at 10:36, maxwolf waxm...@gmail.com wrote: I wonder if protobuf messages are safe to be crypto signed? If you just sign the content of a message, then this should be an operation that should not require that a message is generated the same for different implementations,

Re: [protobuf] do the protocol buffer support java generics?

2010-03-19 Thread Henner Zeller
Hi, do the protocol buffer support java generics? if support, how can I define the .proto file ? Not sure what you mean here. Lists for instance you pass to the builder or get from a proto buff object have the type of the content as generic parameter. There are no 'template parameters' for

Re: [protobuf] int32 negative numbers

2010-03-21 Thread Henner Zeller
On Sun, Mar 21, 2010 at 08:05, Adam Kwintkiewicz adam.kwintkiew...@gmail.com wrote: ... for a negative number, the resulting varint is always ten bytes long ... Reason for that is the varint encoding: it only encodes the bits that are set in an integer. For small positive values that results in

Re: [protobuf] Serializing nested messages

2010-03-29 Thread Henner Zeller
On Mon, Mar 29, 2010 at 10:31, Nader Salehi nadersale...@gmail.com wrote: Hi, In my code, I have a PB message which encompass other PB messages. For instance, Protocol Buffer File === message A {  required int32 a = 1; } message B {  required int32 b = 1; } message C {

Re: [protobuf] Re: Serializing nested messages

2010-03-29 Thread Henner Zeller
what your constraints are. -h Nader On Mar 29, 2:41 pm, Henner Zeller henner.zel...@googlemail.com wrote: On Mon, Mar 29, 2010 at 10:31, Nader Salehi nadersale...@gmail.com wrote: Hi, In my code, I have a PB message which encompass other PB messages. For instance, Protocol Buffer

Re: [protobuf] Re: Serializing nested messages

2010-03-30 Thread Henner Zeller
HI, On Mon, Mar 29, 2010 at 23:20, Nader Salehi nadersale...@gmail.com wrote: On Mar 29, 10:59 pm, Henner Zeller henner.zel...@googlemail.com wrote: On Mon, Mar 29, 2010 at 22:53, Nader Salehi nadersale...@gmail.com wrote: These are valid points, but I need to work within the constraints

Re: [protobuf] Steps for installing the java set of the compiler libraries

2010-03-31 Thread Henner Zeller
On Tue, Mar 30, 2010 at 08:16, Suvojit chanda.c...@gmail.com wrote: can anyone please help me with the set of instructions for installing the protobuf compiler compatible with the java version.I did go through the readme file, but does evrything needs to be done thru commmand line or is there

Re: [protobuf] i am not able to compile the files which includes import statements

2010-04-09 Thread Henner Zeller
On Fri, Apr 9, 2010 at 04:09, prashant waykar waykar.prash...@gmail.com wrote: Hello, can someone please help me out as i am new to PB. i am getting compile errors in the files which consists import statements Thanks in advance You need to be a bit more specific. So if you mention errors, it

Re: [protobuf] Protocol Buf compliation problem (Linux 2.4)

2010-04-13 Thread Henner Zeller
gcc 3.2.3 is a pretty ancient, seven years old compiler. Can't you just install new version ? On Tue, Apr 13, 2010 at 03:38, Nir Belinky belink...@gmail.com wrote: I downloadd protobuf 2.3.0 and tried to compile it on linux 2.4, I receive the following errors: OS: Linux version

Re: [protobuf] Re: compile issue with import statements having path info

2010-04-13 Thread Henner Zeller
On Tue, Apr 13, 2010 at 11:24, CB cn...@verizon.net wrote: Workarounds aside, there is still a bug to be fixed. If you wish to argue that the .proto files or the -I options I passed to proto are invalid, then protoc should have declared an error. If you wish to argue that the .proto files

Re: [protobuf] Message was missing required fields

2010-04-16 Thread Henner Zeller
On Fri, Apr 16, 2010 at 11:05, SyRenity stas.os...@gmail.com wrote: Hi. I'm getting occasionally the following error below in my Java app: com.google.protobuf.InvalidProtocolBufferException: Message was missing required fields.  (Lite runtime could not determine which fields were missing).

Re: [protobuf] Re: question about SerializeToString output for cpp

2010-06-11 Thread Henner Zeller
I have no idea about the hadoop pipes, but wouldn't it be easier to just add an implementation of the pipes to be length delimited instead of trying to mundge the binary data you're sending ? You'd probably loose a lot of speed if you would edit the binary data afterwards. After all, this is what

Re: [protobuf] hasXxx methods

2010-06-22 Thread Henner Zeller
Hi, 2010/6/22 Miguel Muñoz swingguy1...@yahoo.com: Comrades,   I've been setting a value of a single optional field in a message with many optional fields. In my diagnostic code I'm calling the hasXxx() methods to find out which field is set, but it's telling me they're all set. Is this a bug

Re: [protobuf] Design advice: variability (at runtime) on the number of fields in a message

2010-07-14 Thread Henner Zeller
On Wed, Jul 14, 2010 at 14:19, mark.t.macdon...@googlemail.com mark.t.macdon...@googlemail.com wrote: Let's assume I'm designing a distributed (client-server) application. The server owns a bunch of parameters. The client (GUI) is to be periodically updated when any of their values change. I

Re: [protobuf] Re: C++ syntax: how to set a singular enum field

2010-07-19 Thread Henner Zeller
On Fri, Jul 16, 2010 at 06:33, Evan Jones ev...@mit.edu wrote: On Jul 16, 2010, at 5:47 , mark.t.macdon...@googlemail.com wrote: if (stabiliser.retraction()==device::HOUSED) coutTrue\n; //but this doesn't compile stabiliser.set_retraction(device::RETRACTED); } See the generated .h file to

Re: [protobuf] Security Layer to make sure proto objects are not tampered when transferred over https

2010-07-21 Thread Henner Zeller
On Wed, Jul 21, 2010 at 03:32, Prakash Rao prakashrao1...@gmail.com wrote: Is there a way to add security layer to protocol buffer if I'm writing my proto objects to https output stream? In java we have sealed objects and we can have signature attached to it to make sure objects are not

Re: [protobuf] Scalar types

2010-07-21 Thread Henner Zeller
2010/7/21 Julian González julian@gmail.com: Does protocol buffers support an scalar type of one byte or two byte length? lets say an int16, int8? No. But note that integers are 'varint' encoded, so if you only give a small value, it will only eat up a small amount of bits. So a number in

Re: [protobuf] Re: What's the point of Protocol Buffers?

2010-07-22 Thread Henner Zeller
On Thu, Jul 22, 2010 at 07:50, Tim Acheson tim.ache...@gmail.com wrote: If you can show me a format which offers faster serialisation or deserialisation than JSON in a .NET application, I'd be impressed! :) If the speed and size of JSON serialization is good enough for you, stick with it.

Re: [protobuf] Parsing problem using protobuf

2010-08-12 Thread Henner Zeller
On Wed, Aug 11, 2010 at 22:48, anup anup007s...@gmail.com wrote: Hi I am impkementing protobuffers in my Symbian application and during parsing I am sending a file to the proto parser but when I am collecting my attributes its giving garbage values along with the real data. I  dont know what

Re: [protobuf] Re: iSeries port

2010-08-17 Thread Henner Zeller
On Mon, Aug 16, 2010 at 17:04, ury ury.se...@gmail.com wrote: Hi, It was EBCDIC vs. ASCII issues. If anyone is interested in iSeries/zSeries porting issues, or protobuf on EBCDIC, I'll be glad to help In particular if you needed to modify the source and have a patch it might be interesting

Re: [protobuf] How to set a user defined data within a message

2010-08-19 Thread Henner Zeller
2010/8/19 Julian González julian@gmail.com: I have the following: message Configuration {        required LogInfo logInfo = 1;        required ApmCfg apmCfg = 2;        repeated Rail rail = 3;        required TriggerInfo triggerInfo = 4; } I have an object of type Configuration, but

Re: [protobuf] Memory leak detected in protobuf

2010-09-02 Thread Henner Zeller
On Thu, Sep 2, 2010 at 08:03, Jean-Sebastien Stoezel js.stoe...@gmail.com wrote: Hello, I am observing a memory leak after including the protobufs in my project. I would like to investigate whether this leak is due to this library or the use I make of it. I am using the protobufs (latest

Re: [protobuf] Re: Status of protobufs

2010-09-02 Thread Henner Zeller
On Thu, Sep 2, 2010 at 09:59, Jean-Sebastien Stoezel js.stoe...@gmail.com wrote: Hence I'm now using delimiters. But make sure to use length delimiting: length + message. Don't feel tempted to just delimit the message with 'special characters' because of course they might be just part of a

Re: [protobuf] Do Protocol Buffers read entire collection of messages into memory from file?

2010-10-19 Thread Henner Zeller
On Tue, Oct 19, 2010 at 06:45, ksamdev ksam...@gmail.com wrote: Hi, I am wondering how do Protocol Buffers read input files? Is the entire file read into memory or some proxy technique is used and entries are read only when required? If you have a sequence of messages you process then you'd

Re: [protobuf] omitting tag numbers

2010-10-22 Thread Henner Zeller
On Fri, Oct 22, 2010 at 15:01, Paul mjpabl...@gmail.com wrote: Hi, This may seem like a basic question, but I find having to label the .proto file with unique tag numbers for each field a little cumbersome, especially if there are a lot of fields. message Person {  required string name =

Re: [protobuf] Re: omitting tag numbers

2010-10-25 Thread Henner Zeller
include the field name, then your throw out part of the advantages of protocol buffers out of the window: speed and compact binary encoding. On Oct 22, 6:02 pm, Henner Zeller henner.zel...@googlemail.com wrote: On Fri, Oct 22, 2010 at 15:01, Paul mjpabl...@gmail.com wrote: Hi, This may

Re: [protobuf] Re: omitting tag numbers

2010-10-25 Thread Henner Zeller
On Mon, Oct 25, 2010 at 16:11, Henner Zeller henner.zel...@googlemail.com wrote: On Mon, Oct 25, 2010 at 16:10, maninder batth batth.manin...@gmail.com wrote: I disagree. You could encode field name in the binary. Then at de- serialization, you can read the field descriptor and reconstruct

Re: [protobuf] Possible Memory Leaks

2010-10-25 Thread Henner Zeller
On Mon, Oct 25, 2010 at 17:46, rthompson.dtisoft@gmail.com rthompson.dtisoft@gmail.com wrote: I ran Valgrind on our application and found quite a few possibly lost bytes traces.  Here is an example of one ==1473==    at 0x40263A0: operator new(unsigned int) (vg_replace_malloc.c:214)

Re: [protobuf] protocol buffer within a protocol buffer from C++ to Java

2010-10-25 Thread Henner Zeller
On Mon, Oct 25, 2010 at 18:45, Paul mjpabl...@gmail.com wrote: Hi, I am trying to serialize a protocol buffers message into a string that is contained in another protocol buffer.  I am doing the serialization on the C++ side. // This is the outer protocol buffer message Measurement {  

Re: [protobuf] including common message definitions across .proto files

2010-10-26 Thread Henner Zeller
On Tue, Oct 26, 2010 at 11:29, Paul mjpabl...@gmail.com wrote: Hi, Suppose I have two files, file1.proto and file2.proto, and I have a message defined in file1 that I want to use in file2.  How would I include the message from file1?  Is there an include statement I would use as in C or C++?

Re: [protobuf] Read selective fields without deserializing the entire object?

2010-10-29 Thread Henner Zeller
On Fri, Oct 29, 2010 at 16:13, Ashwin Jayaprakash ashwin.jayaprak...@gmail.com wrote: Is there a way to read selective fields without deserializing the entire object? My serialized message is stored in memory as a (Heap)ByteBuffer. I'm trying to find out if any of the (de-)serialization

Re: [protobuf] Re: Why to reinvent the wheel ?

2010-11-09 Thread Henner Zeller
There are some standards that pack many different ways to put things under one umbrella. This is because they have been decided by committee with many different companies involved that all want to bring in 'their way'. The multitude of ways to encode things with ASN.1 (why there is more than one

Re: [protobuf] fails to parse from string

2010-11-10 Thread Henner Zeller
On Wed, Nov 10, 2010 at 08:23, Brad Lira snmp.apa...@gmail.com wrote: client side: address_book.SerializeToString(mystr) strncpy(buf, mystr.c_str(), strlen(mystr.c_str())); This is an error - you only copy to the first \0 byte (strlen looks for a nul-terminated string) -- however, the string

Re: [protobuf] Swap() on Windows

2010-11-10 Thread Henner Zeller
Is this even a legal transformation that the MS compiler is doing there ? Sounds like a overzealous-optimization compiler bug to me. Did you try to manually remove the 'const' in the generated proto code to see if that would fix it ? On Wed, Nov 10, 2010 at 18:51, Anand Ganesh

Re: [protobuf] image

2010-12-16 Thread Henner Zeller
On Thu, Dec 16, 2010 at 04:11, leo kmukes...@gmail.com wrote: I am planning to use 'Protocol Buffers' in one of my Java ME project which requires server to send catalogs (possibly with images). Can I send images (PNG format) using 'Protocol Buffers'? With the type 'bytes', you can send

Re: [protobuf] C# client to Java based server

2010-12-28 Thread Henner Zeller
On Tue, Dec 28, 2010 at 15:14, Kenton Varda ken...@google.com wrote: Protocol buffers itself has no built-in RPC implementation.  You have to find an RPC implementation that supports whatever languages you are interested in, or write your own.  It's not too hard to write a simple RPC

Re: [protobuf] Re: New protobuf feature proposal: Generated classes for streaming / visitors

2011-02-02 Thread Henner Zeller
On Tue, Feb 1, 2011 at 23:02, fpmc f...@google.com wrote: Your proposal has one VisitXXX function for each repeated type.  How does it handle a message with two repeated fields of the same type? I guess the naming is confusing in the example. The Visit is per field-name; but since the typed is

Re: [protobuf] field of type timestamp or date with protobuf message

2011-02-12 Thread Henner Zeller
On Sat, Feb 12, 2011 at 09:13, Marco@worldcorp mmistr...@gmail.com wrote: HI all  is it possible to add a field of type timestamp , or date, to a protobuf message.. There is no 'default' way. The reason for that is that protocol buffers are platform independent, and there is no real agreeable

Re: [protobuf] Store number of messages

2011-03-04 Thread Henner Zeller
Varint does an encoding whose length changes with the size of the number - hence the name. So it can use between 1 and 10 bytes. So when the value _events_written changes, re-writing the same number at the beginning of the file will use a different number of bytes. If you want to write a number

Re: [protobuf] ProtoBuf and Multi-Threads

2011-03-14 Thread Henner Zeller
On Mon, Mar 14, 2011 at 10:08, ksamdev samvel.khalat...@gmail.com wrote: Hi, I have a large set of files with a number of the same type messages saved. My code reads messages in a sequence from these files one after another. I've measured time (with terminal time command) of running the code,

Re: [protobuf] ProtoBuf and Multi-Threads

2011-03-14 Thread Henner Zeller
On Mon, Mar 14, 2011 at 10:34, ksamdev samvel.khalat...@gmail.com wrote: Thanks for a quick reply. Honestly, I fill a set of histograms for each event. I've added this feature only recently and have a version of the code without histograms. Here is the same performance measurement without

Re: [protobuf] ProtoBuf and Multi-Threads

2011-03-15 Thread Henner Zeller
On Tue, Mar 15, 2011 at 06:05, ksamdev samvel.khalat...@gmail.com wrote: I like the interest in the topic. I've put 1GB to emphasize that the use case is safe. In fact, I save messages in file in next way: XYXYXYXYXY. where X is the size of the message and Y is the message itself. Each

Re: [protobuf] ProtoBuf and Multi-Threads

2011-03-15 Thread Henner Zeller
::io::CodedInputStream coded_in(raw_in); ... and this one should be in the loop, yes.   // Read message and use it if read was successfull   if (! /* are there more messages left? */)     continue_reading = false; } On Tue, Mar 15, 2011 at 11:48 AM, Henner Zeller henner.zel...@googlemail.com

Re: [protobuf] Inheritance..

2011-03-17 Thread Henner Zeller
On Thu, Mar 17, 2011 at 02:41, ctapobep stanislav.bashkirt...@gmail.com wrote: So pity protobuf doesn't support inheritance, only because of this I can't use it. Any forecasts, are creators going to add this feature? There are good reasons not to support inheritance and it would be a design

Re: [protobuf] Error while de-serializing

2011-03-22 Thread Henner Zeller
On Tue, Mar 22, 2011 at 10:53, nidheeshdas nidheesh...@gmail.com wrote: I've a bool and a string in the proto file compiled to cpp both required. when i send them with empty string the bool is also getting affected. does protobuf mishandles the bools ? What do you mean with 'affected' ?

Re: [protobuf] DebugString causing a crash

2011-04-04 Thread Henner Zeller
On Mon, Apr 4, 2011 at 00:26, des fitzgerald d...@intrepid-geophysics.com wrote: Hi, below is more orless the same example in the on-line documentation the message Foo example turned into a cppunit_test I thought the DebugString method would always work, based upon what I have read. This

Re: [protobuf] UnmodifiableLazyStringList is not Serializable

2011-04-13 Thread Henner Zeller
On Wed, Apr 13, 2011 at 06:45, J.S. goo...@juergenschmied.de wrote: Hi! Passing a buffer with a repeated String from one EJB to another, I get:  javax.ejb.EJBException: java.rmi.MarshalException: CORBA BAD_PARAM 1398079494 Maybe; nested exception is:        

Re: [protobuf] Re: UnmodifiableLazyStringList is not Serializable

2011-04-13 Thread Henner Zeller
On Wed, Apr 13, 2011 at 16:01, Ben Wright compuware...@gmail.com wrote: I agree with J.S. on this one - there are many situations in Java EE environments where Serializable is checked or java serialization used when it's not simple or feasible to leverage protobuf serialization.  Most of these

Re: [protobuf] Zero tag number in enum data type

2011-04-18 Thread Henner Zeller
On Mon, Apr 18, 2011 at 22:28, Canggih cangca...@gmail.com wrote: hello, i just wanna share. In Protobuf developer guide, in the sample proto file, there is a PhoneType enum data type, consist of MOBILE, HOME, and WORK. MOBILE use '0' as its tag number, and so on. This is the integer value

Re: [protobuf] Is message rename binary compatible?

2011-05-17 Thread Henner Zeller
On Tue, May 17, 2011 at 07:46, Imagination's End eda...@disemia.com wrote: Say I have a message used like this: message old_name { ... } message wrapper {  repeated old_name items = 3; } I want to rename old_name to new_name. Is this binary compatible? That is, will users of the previous

Re: [protobuf] Is the Protocol Buffers serialization format standardized?

2011-07-15 Thread Henner Zeller
On Fri, Jul 15, 2011 at 08:19, jl jlaben...@gmail.com wrote: We are wondering if the serialized data format used by Protocol Buffers is standardized or in some way set in stone? In other words, should we have any expectation that it will change in the future and we won't be able to read the

Re: [protobuf] Proto Buf License missing

2011-08-17 Thread Henner Zeller
On Wed, Aug 17, 2011 at 15:50, Ali Asghari bob9...@gmail.com wrote: Hi, I would love to use your code, however the license for them appears to be missing. The link provided points to a license generation tool, however I doubt our legal department will accept this as it does not directly

  1   2   >