Re: A quick question regarding writing protobuf message to Stream preceded by Header

2009-09-07 Thread Dave W.
To allocate a correctly-sized array and serialize to it with optimal efficiency you have to use ByteSize() and then call SerializeToArrayWithCachedSizes() -- which reuses the sizes computed by the previous ByteSize() call. Where is this

Strange Eclipse compiler error.

2009-09-07 Thread Brice Figureau
Hi, I'm using eclipse (3.5) on a large project using protobuf v2.1.0, and I'm encountering tons of strange Eclipse java compiler error on every protobuf java generated code. All the errors looks like this one: The method mergeFrom(Message) is ambiguous for the type

Re: A quick question regarding writing protobuf message to Stream preceded by Header

2009-09-07 Thread Kenton Varda
Sorry, it's actually SerializeWithCachedSizesToArray(). It's defined on the MessageLite interface so every protocol message object has this method. On Mon, Sep 7, 2009 at 7:03 AM, Dave W. evadef...@gmail.com wrote: To allocate a correctly-sized array and