Re: [protobuf] Deserialize messages from CodedInputStream without a message size prefix

2010-12-13 Thread Saptarshi Guha
You should be using toByteArray(), not getBytes(), to serialize to the protobuf wire format. Oh those variables are byte array wrappers and contains serialized bytes among other things. You also need to delimit the messages. Got it, thanks. Otherwise, the first ParseFromCodedStream ca

Re: [protobuf] Protobuf 2.3 and compiler warnings

2010-04-15 Thread Saptarshi Guha
Ah, i saw the diff. Thank you Saptarshi On Thu, Apr 15, 2010 at 3:53 PM, Jason Hsueh wrote: > Yes, these are safe to ignore. This is also addressed in > r302: http://code.google.com/p/protobuf/source/detail?r=302 > > On Thu, Apr 15, 2010 at 12:40 PM, Fishtank wrote: >>

Re: [protobuf] protocol message was rejected because it was too big (Turn off?)

2009-12-12 Thread Saptarshi Guha
Thanks much. Regards Saptarshi On Sat, Dec 12, 2009 at 4:40 PM, Kenton Varda wrote: > Actually, this is a better link: > http://code.google.com/apis/protocolbuffers/docs/reference/cpp/google.protobuf.common.html#SetLogHandler.details > For some reason the auto-generated documentation i

[protobuf] protocol message was rejected because it was too big (Turn off?)

2009-12-12 Thread Saptarshi Guha
nly use PB) writing to s.err and s.out can adversely affect my program. Q. Is there a flag I can set to not display the warning? i.e silently fail? I'm not using CodedInputstream, instead I use ParseFromArray (i have read in the bytes with m own functions) Regards Saptarshi -- You received this

[protobuf] Re: On SnowLeopard, EXC_CRASH (SIGABRT)

2009-11-01 Thread Saptarshi Guha
gards Saptarshi On Nov 1, 2009, at 3:15 AM, Kenton Varda wrote: > Sorry, I don't have access to a Snow Leopard machine to test this on. > > However, your second link looks like a very likely culprit. They > seem to be saying that all C++ code on Snow Leopard needs t

[protobuf] Re: On SnowLeopard, EXC_CRASH (SIGABRT)

2009-10-31 Thread Saptarshi Guha
r_break to debug " on Snow Leopard (i can't recall the machine type) On another note, I read that( from an emacs blog) that Snow Leopard has "fully dynamic strings" enabled by default and there is an issue regarding freeing such strings[2] . I'm not sure if this e

[protobuf] On SnowLeopard, EXC_CRASH (SIGABRT)

2009-10-30 Thread Saptarshi Guha
sh on SnowLeopard (gcc4.2) I'm not sure why this happens. The crash appears to arise within the protobuf calls. Regards Saptarshi Process: R [34034] Path:/Applications/R64.app/Contents/MacOS/R Identifier: org.R-project.R Version: R 2.10.0 GUI 1.30 Leopard bu

[protobuf] Re: File already exists in database: abort trap

2009-10-28 Thread Saptarshi Guha
new > features), so you should not try to write your own parser! Yes , after I sent that email, romain pointed me to the c++ API whereupon I found the methods you mentioned. My mistake. I saw the java generator and got a rudimentary idea if how it was being done. Thanks

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

2009-08-28 Thread Saptarshi Guha
it came to right tiny messages (~1KB) 10MM(=M) times . Surprisingly, the output to array is much slower than the other two. Thanks for your input, it was really helpful. Regards Saptarshi On Thu, Aug 27, 2009 at 10:19 PM, Kenton Varda wrote: > BTW, when I talk about one thing being m

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

2009-08-27 Thread Saptarshi Guha
for this. > All of these methods require that you write the size first if you intend to > write multiple messages to the stream. Yes, I will be writing the length first. I should point out I haven't had much experience with write,fwrite so my und

Re: optional bytes vs repeated bytes

2009-08-24 Thread Saptarshi Guha
Hello, Thank you! Being new to c++ i had no idea of the size method. I was thinking of strlen on c_str() which would have given me the wrong number of bytes. Nice and clean now. Regards Saptarshi On Mon, Aug 24, 2009 at 3:21 PM, Kenton Varda wrote: > In C++, "bytes" fields are sto

optional bytes vs repeated bytes

2009-08-24 Thread Saptarshi
header files). But when it comes to reading it, how do i know the number if bytes stored in the string? Suppose I my data looks like 0x00,0x00,0x00, what will be the length? I am currently using option (c). Have I missed something? Is there a better approach. Thank you in advance Saptarshi

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

2009-08-23 Thread Saptarshi
round. Regards Saptarshi --~--~-~--~~~---~--~~ 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 pr

Re: Protocol Buffers and pretty print

2009-08-22 Thread Saptarshi
This was exactly what I needed. Much thanks. On Aug 22, 2:08 pm, Kenton Varda wrote: > message->DebugString() is a shortcut that returns a string representation of > the message. > > On Fri, Aug 21, 2009 at 9:06 PM, Saptarshi wrote: > > > Hello, > > I'm n

Re: Protocol Buffers and pretty print

2009-08-21 Thread Saptarshi
Hmm, I fount the text output here: http://code.google.com/apis/protocolbuffers/docs/reference/cpp/google.protobuf.text_format.html Thank you Saptarshi On Aug 22, 12:06 am, Saptarshi wrote: > Hello, > I'm new to using Protocol Buffers and am debugging my program. > Is there a

Protocol Buffers and pretty print

2009-08-21 Thread Saptarshi
something like : print(rxp) in gdb to get the contents? Thank you Saptarshi --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to protobuf