[protobuf] Re: Can't read in Java message sent from C++

2010-07-10 Thread Maxim Leonovich
I watched on both buffers: they are similar, but in C++ I can't find a leading Variant32 with size, when in Java it exists. The rests of buffers are identical. http://pic4.ru/8337 http://pic4.ru/8338 http://pic4.ru/8339 On 10 июл, 19:33, Evan Jones wrote: > On Jul 10, 2010, at 7:47 , Maxim Leonov

[protobuf] Re: Can't read in Java message sent from C++

2010-07-10 Thread Maxim Leonovich
I tried to convert msg.ByteSize() to LittleEndian and to BigEndian, but that didn't helps. I thought, that {0 0 0 18 ... } is the size, but no. Size is 17. Look at screens: in C++ I have {17 8 1 26 12 ...}. In Java : {0 0 0 18 17 8 1 26 12...} But what is {0 0 0 18} ? I have no more IO operations e

[protobuf] Re: Can't read in Java message sent from C++

2010-07-11 Thread Maxim Leonovich
Thanks for all. I figured out. The problem with "{0 0 0 18}" really was in Qt library, not in protobuffs. On 11 июл, 07:53, Kenton Varda wrote: > On Sat, Jul 10, 2010 at 12:00 PM, jamesmikedup...@googlemail.com < > > jamesmikedup...@googlemail.com> wrote: > > the leading variant in c++ is most li

Re: [protobuf] Re: Can't read in Java message sent from C++

2010-07-10 Thread jamesmikedup...@googlemail.com
the leading variant in c++ is most likely in the wrong byte order if you are running a x86 machine. as i said, you need to flip them. mike On Sat, Jul 10, 2010 at 8:53 PM, Maxim Leonovich wrote: > I watched on both buffers: they are similar, but in C++ I can't find a > leading Variant32 with size

Re: [protobuf] Re: Can't read in Java message sent from C++

2010-07-10 Thread jamesmikedup...@googlemail.com
Ok, well then just read out 4 bytes first in java and they get your 17 8 1 0 0 0 18 might be the lenght that you are not reading first. mike On Sat, Jul 10, 2010 at 9:50 PM, Maxim Leonovich wrote: > I tried to convert msg.ByteSize() to LittleEndian and to BigEndian, > but that didn't helps.

Re: [protobuf] Re: Can't read in Java message sent from C++

2010-07-10 Thread Kenton Varda
On Sat, Jul 10, 2010 at 11:53 AM, Maxim Leonovich wrote: > I watched on both buffers: they are similar, but in C++ I can't find a > leading Variant32 with size, when in Java it exists. The rests of > buffers are identical. > http://pic4.ru/8337 > http://pic4.ru/8338 > http://pic4.ru/8339 0 0 0

Re: [protobuf] Re: Can't read in Java message sent from C++

2010-07-10 Thread Kenton Varda
On Sat, Jul 10, 2010 at 12:00 PM, jamesmikedup...@googlemail.com < jamesmikedup...@googlemail.com> wrote: > the leading variant in c++ is most likely in the wrong byte order if > you are running a x86 machine. as i said, you need to flip them. > mike > Mike, varint (I assume that's what you meant