On 1 November 2014 02:24, Pradeep Gollakota pradeep...@gmail.com wrote:
Confirmed... When I replaced the md variable with the compiled Descriptor,
it worked. I didn't think I was mixing the descriptors, e.g. the
MessagePublish message is one that is produced via the compiled API and
parsed
Basically, you can't do that in pure Java - the compiler is a C++
binary, there is no Java version.
Still, working with the output of --descriptor_set_out is probably the
way to go here. If you have the .proto file ahead of time, you can
pregenerate the descriptor output at build time and store
You may be running into issues where the set of descriptors associated
with your parsed DynamicMessage (i.e. the ones you parsed at runtime)
do not match the set of descriptors from your pregenerated code (which
will be using their own descriptor pool). IIRC they're looked up by
identity, so even
On 30 October 2014 02:53, Pradeep Gollakota pradeep...@gmail.com wrote:
I have a use case where I need to parse messages without having the
corresponding precompiled classes in Java. So the DynamicMessage seems to be
the correct fit, but I'm not sure how I can generate the DescriptorSet from
On 24 October 2014 17:28, Peter Hubner peter.hub...@gmail.com wrote:
All I am trying to achieve is to modify a message on the fly with a set of
fields that are supplied to the program at runtime.
simple case:
// message declared as - const google::protobuf::Message message
auto x =
Presumably this is because, if your example was allowed, a valid
MyMsgA encoding would no longer be a valid MyMsgB encoding.
Oliver
On 25 October 2014 13:28, Anthony Sampton anthony.samp...@gmail.com wrote:
I'm pretty sure it's not only me who faced with this problem, BUMP.
--
You received
On 25 October 2014 14:15, Oliver Jowett oliver.jow...@gmail.com wrote:
Presumably this is because, if your example was allowed, a valid
MyMsgA encoding would no longer be a valid MyMsgB encoding.
Sorry, I mean, would no longer be a valid encoding of MyMsgA as
extended by the extension declared
On 8 October 2014 06:51, Konstantin Utkin
eternalego.erepub...@gmail.com wrote:
Ugly. And what if I have multiple nesting, arrays? It leads to tons of macro
with huge routine work, and It's simple to convert each C structure
manually. But it is so boring! Maybe anyone has found a better way?
I would guess that you are #including sys/sysmacros.h (perhaps
indirectly) which looks like this on my system:
/* Access the functions with their traditional names. */
#define major(dev) gnu_dev_major (dev)
#define minor(dev) gnu_dev_minor (dev)
#define makedev(maj, min) gnu_dev_makedev (maj,
On 23 May 2014 22:06, Alessandro Sivieri alessandro.sivi...@gmail.comwrote:
I don't think the communication channel is causing any problem, because the
array sequences are not simply truncated but really different (I would
expect them to be identical).
Check again; it looks like your Java
On 24 May 2014 01:23, Oliver Jowett oliver.jow...@gmail.com wrote:
On 23 May 2014 22:06, Alessandro Sivieri alessandro.sivi...@gmail.comwrote:
I don't think the communication channel is causing any problem, because
the array sequences are not simply truncated but really different (I would
The primary protobuf serialization format is the binary format, not the
text format. Is there some reason you can't use the binary form?
Oliver
On 15 May 2014 18:33, Ganesh Sangle saygane...@gmail.com wrote:
Let me clarify the question.
1. I did not say that protobuf is affected by \r\n.
2.
On 28 March 2014 15:54, Zhiqian Yuan onyourmark...@gmail.com wrote:
Those two fields are string type, but like other integer enumerations,
they both have a range to set value. So I decide they should be implemented
as string-valued enum type. But there's no such a thing either in C++ or in
Don't you want mode wb? Sounds like a classic case of opening a file in
text mode and getting LF - CRLF translation happening on Windows.
Oliver
On 11 December 2013 06:04, Andrew Beck abec...@gmail.com wrote:
Using python 2.7.6 on darwin and windows, both using protoc 2.5.0 and libs
from
On 17 November 2013 22:21, Kiran Kumar kirankumar@gmail.com wrote:
char const *rt_msg = (char *)malloc(512);;
Rtmesg-SerializeToArray((void *)rt_msg, size);
cout rt_msg; This prints absolutely junk.
You are trying to print the encoded form of
On Thu, Sep 5, 2013 at 1:52 PM, Chris Dew cms...@gmail.com wrote:
Where is the (meta) .proto file which describes .desc files?
I make .desc files with: protoc --descriptor_set_out=foo.desc
--include_imports foo.proto.
On Mon, Aug 19, 2013 at 8:37 PM, Tom Ward tw...@thefoundry.co.uk wrote:
Basically I'm trying to work out how to deserialize a protobuf message
without using the generated headers, as we're likely to get messages that
weren't generated at compile time. I've looked through the documentation,
On Tue, Aug 6, 2013 at 7:18 PM, Feng Xiao xiaof...@google.com wrote:
On Mon, Aug 5, 2013 at 9:31 PM, V.B. vidalborro...@gmail.com wrote:
... Actually, I just now took a closer look at the readChunk() method.
Even that method makes an internal copy, so it looks like readChunk() isn't
what we
On Wed, Jul 24, 2013 at 8:22 AM, Lotte R. Leben lo...@zombietetris.dewrote:
*But* As far as I know readDelimited() only works with inputStreams, which
kind of contradicts the whole UDP thing.
Since adding the delimiter was a tad tricky, I wasn't confident that the
following would work:
-
On Wed, Jul 24, 2013 at 12:27 AM, Andreas Reuter
andreas.rou...@googlemail.com wrote:
Hello,
we are using Protobuf to communicate between two devices via Ad-hoc WiFi.
One of the devices is running a Java application and the other a Python
application.
[...]
6. Upon closer inspection,
On Wed, May 15, 2013 at 11:16 AM, mailto.jo...@gmail.com wrote:
I think it is more of a bug in the protoc implementation that it fail's to
parse such a message.
Do you have some test code to share?
(I got as far as eyeballing the C++ implementation and it looks OK at a
first glance)
Oliver
On Wed, May 15, 2013 at 12:02 PM, Oliver Jowett oliver.jow...@gmail.comwrote:
On Wed, May 15, 2013 at 11:16 AM, mailto.jo...@gmail.com wrote:
I think it is more of a bug in the protoc implementation that it fail's to
parse such a message.
Do you have some test code to share?
(I got
On Thu, Apr 25, 2013 at 2:13 AM, Christian Gross
christianhgr...@gmail.comwrote:
So I am trying to wrap my head around protocol buffers and used it for a
few tests, however, I found it problematic in my case for the following
reasons:
1) Creating a multi message end point by mocking unions
https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/CodedOutputStream.html#newInstance(byte[],
int, int)
On Tue, Apr 23, 2013 at 7:12 PM, adam.h adam.p.haj...@gmail.com wrote:
Hi Protobufs Apostles,
There is nice function to deserialize from the buffer -
On Sat, Apr 20, 2013 at 4:38 PM, Oliver Wang python...@gmail.com wrote:
So the from generated code, I would expect an access method such as
set_foo() set_bar and set_baz() so that I can connect Foo object to the
message. But I don't see it at all, there are methods such as has_foo()
On Sun, Apr 21, 2013 at 9:48 PM, Oliver Wang python...@gmail.com wrote:
Can't you use ByteSize() method to get the size?
Not when you're parsing - you don't have a message instance yet!
Oliver
--
You received this message because you are subscribed to the Google Groups
Protocol Buffers
On Tue, Apr 16, 2013 at 4:43 PM, brsckap ped...@brsc.com wrote:
std::ifstream inputStream;
inputStream.open(pbInput);
Text-mode open is corrupting your encoded message, probably.
Oliver
--
You received this message because you are subscribed to the Google Groups
Protocol Buffers
On Sun, Apr 14, 2013 at 7:26 PM, Predator33 predator...@gmail.com wrote:
The only thing I could think of is maybe the protobuf stream doesn't flush
itself out until the destructor is hit and since that never happens until
after the fact, it never gets flushed?
Yes, this will be what is
On Fri, Apr 12, 2013 at 7:59 PM, Leonid G leonid.ge...@gmail.com wrote:
I am actually working on a build system and in my case all file names are
an absolute path, not relative. With absolute path method suggested above
(without -I) fails with
$ google/protobuf/2.3.0/gcc_4.1.2/64/bin/protoc
On Fri, Apr 12, 2013 at 8:43 PM, Leonid G leonid.ge...@gmail.com wrote:
Thanks, Oliver.
problem is that build system is such that those protos are necessarily
under common root.
Not quite sure what you mean.
I guess I'll figure it out.
Well, you can perhaps think of it this way: you
On Thu, Mar 28, 2013 at 12:54 AM, W. David Jarvis venant...@gmail.comwrote:
If I compare the len() of the two strings (pre-writing/reading v.
post-writing/reading) I tend to get two add'l chars on the reading, so I
guess I'm confused by how this is getting truncated? Is python running into
a
On Fri, Mar 22, 2013 at 8:45 AM, kramer65 kram...@gmail.com wrote:
I've been tinkering about this all night, but with a fresh view in the
morning I still can' t understand what is wrong here. The line where the
error originates is this: beat.ParseFromString(message)
Are you sure your
On Thu, Mar 21, 2013 at 8:48 AM, Vic Devin vfn...@gmail.com wrote:
What I mean is that they all try to solve, leaving aside all tech details,
the same basic problem, i.e. remote communication between software entities.
There are plenty of applications of protobuf (and ASN.1 for that matter)
On Fri, Mar 15, 2013 at 11:59 PM, Feng Xiao xiaof...@google.com wrote:
On Fri, Mar 15, 2013 at 8:23 AM, Joann Kent joj...@gmail.com wrote:
Hi all,
Within the code generated by GPB (I'm using Java btw) there are
exceptions thrown and the messages are hard-coded and in English. Are
there
On Thu, Mar 14, 2013 at 2:37 AM, Sumit Kumar kumar.su...@hotmail.comwrote:
No you cant, on C++ bytes translates to string, wont allow for null.
std::string handles NULs just fine, and protobuf's use of it for bytes
fields also works fine. (I have code that's been in production for a few
years
On Tue, Mar 5, 2013 at 2:25 AM, Mohammad Husain farhan1...@hotmail.comwrote:
g++ `pkg-config --cflags --libs protobuf` -o hello_protobuf
hello_protobuf.o user.pb.o
Probably just argument ordering. The library reference (which will come
from pkg-config --libs) needs to appear after the object
On Sat, Feb 2, 2013 at 12:02 PM, Roman roman.sima...@gmail.com wrote:
Hello!
I read a lot about delimiting messages by VarInt32 number before each
serialized message. It requires some additional coding. In the same time I
guess that parsing code of GPB must understand when it must stop
On Tue, Jan 29, 2013 at 11:23 AM, David Granados deivi...@gmail.com wrote:
this does not work :-(
That's not really a useful description of the problem.
229 google::protobuf::io::GzipOutputStream
gzip_stream(arrayStream);
230 if
(Readding the list cc:)
On Tue, Jan 29, 2013 at 4:32 PM, David Granados deivi...@gmail.com wrote:
Does not work :-(
Size of proto before: 196, size of proto after gzip: 196
What measures this? Nothing in any code you quoted.
Now my code are:
206 template class T int
207
On Fri, Jan 18, 2013 at 9:58 PM, David Granados deivi...@gmail.com wrote:
GZipOutputStream gzip_stream(file_stream, GzipOutputStream::Options());
main.cpp:11:4: error: ‘GZipOutputStream’ no se declaró en este ámbito
You have the wrong capitalization (GZip vs Gzip)
Oliver
--
You received
On Sun, Jan 13, 2013 at 12:04 PM, Klaim - Joël Lamotte
mjkl...@gmail.com wrote:
On Sun, Jan 13, 2013 at 9:54 AM, Feng Xiao xiaof...@google.com wrote:
With protobuf reflection you can easily write a function to check if all
fields of a message are set.
I see, thanks for pointing that, it's
On Thu, Dec 13, 2012 at 12:31 AM, Lilithfr alexandre.lam...@gmail.com wrote:
Hello,
I'm looking to change the type of a field from uint64 to fixed64 to reduce
the encoding time but I want to keep the same id and some old application
will still use the old definition.
For my application,
On Tue, Oct 9, 2012 at 8:08 AM, Jack Punt thegr...@gmail.com wrote:
For example: CodedInputStream.newInstance(A.getBytes(), 5,5).isAtEnd()
-- false [when obviously the buffer is 'empty' at this point]
and readBytes() will likewise expect to find more bytes than are actually in
the byte[]
On Tue, Jul 24, 2012 at 3:55 PM, Tobias Neef tob...@gmail.com wrote:
I try to convert the Java representation of a protobuf message into another
message with the same fields (ordering, names, types). I try to do it the
following way but this ends in a java.lang.InstantiationException:
public
On Thu, Jun 21, 2012 at 7:08 AM, Anatoly Deyneka adeyn...@gmail.com wrote:
Why ByteString has only private constructor?
Copying arrays is overhead in my case.
I believe it's that way to guarantee the immutability of a ByteString.
Oliver
--
You received this message because you are subscribed
On Mon, Jun 18, 2012 at 3:07 AM, Jessen Gan jessen...@gmail.com wrote:
Recently,I used Protocol Buffer as a middleware to trans data between server
and mobile_client.Read data from database by hibernate into java
entities,then add into Protocol Buffer Object property one by one.It's a
very
On Wed, May 9, 2012 at 12:42 AM, Jeremy Stribling st...@nicira.com wrote:
I'm wondering if anyone has experience with a scenario like this, and
if there's a more elegant way to solve it.
We do something a bit similar by advertising capabilities during a
handshake at the start of each
On Thu, Apr 19, 2012 at 11:36 AM, kandji adram...@googlemail.com wrote:
Can i use a user-defined java class as a field type in a message
declared in a .proto file?
2- I would like to serialize an instance of the class
MyComplexClass.java.
As you can see, I would use MyComplexClass as a
On Thu, Dec 1, 2011 at 3:22 PM, Vinay Bansal vinsalw...@gmail.com wrote:
void write() {
int fd = open(myfile, O_WRONLY), O_APPEND);
google::protobuf::io::ZeroCopyOutputStream *out = new
google::protobuf::io::FileOutputStream(fd);
google::protobuf::io::GzipOutputStream *gzipOut =
Christopher Smith wrote:
There is also the other end of the spectrum, where I am at. With a
large Hadoop cluster and terabytes of data, the efficient storage and
zippy parsing of protobufs is a huge deal.
In many ways, protobufs allow you do do what XML promised, but much
more efficiently.
phelyks wrote:
if (!unp.ParseFromArray(buffer.c_array(), 0))
You are claiming that the array to parse from is zero bytes long.
Unsurprisingly, trying to parse a zero-byte message doesn't give
anything useful. Perhaps you meant to pass usedBufLen?
-O
--
You received this message because
Kenton Varda wrote:
LDFLAGS=-static isn't good enough?
Nope, something along the way eats it.
-O
--
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
Oliver Jowett wrote:
(For
example, I wonder if the Java code could benefit from the
switch-prediction tricks that the C++ code does?)
FWIW, I hacked something together to test this, producing code that
looks like this:
while (true) {
int tag = input.readTag
2010/1/20 Kenton Varda ken...@google.com:
Are you suggesting that the parser should automatically intern every String
that it parses? That sounds like it could be expensive for those who don't
need it.
More than expensive - it's a permanent memory leak for any app that
passes around many
mk wrote:
Hi
Could someone please help me to install protobuf-2.2.0a on Sun Soalris
machine. I tried even to install it to /usr, but I am still getting
these same errors:
ld: fatal: file .libs/common.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to
Nigel Pickard wrote:
Here's my sample code. In this code, everything works for me -however
when I change the GPBClient to use Data IO streams (just comment out
the Object IO references and uncomment the Data IO references in
GPBClient), that's when I get the
On Tue, Sep 22, 2009 at 5:57 AM, Kenton Varda ken...@google.com wrote:
So Java users don't like relying on C++ code in their build process. On
the other hand, most C++ users would not accept Java in their build process
either. But if we wrote the C++ code generator in C++ and the Java code
Henner Zeller wrote:
And if you do it from an ant-buildfile (often used
in java projects) then it would be as well hard as ant has not really
a notion of file-dependencies (yeah, ant sucks as build-tool).
Perhaps you are looking for uptodate or dependset
-O
Kenton Varda wrote:
Run configure --without-zlib to disable zlib support. Alternatively,
fix it and send me a patch. :)
I took a look at fixing it in gzip_stream.{cc,h} (conditionally removing
GZIP format so you'd get compile errors if you tried to use that on a
system with an old zlib), but
Environment:
protobuf 2.2.0
$ uname -a
SunOS arson 5.10 Generic_118833-23 sun4u sparc SUNW,Sun-Fire-280R
$ g++ -v
Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as
--with-ld=/usr/ccs/bin/ld --enable-shared
Kenton Varda wrote:
I'm pretty sure #1 is not protobuf's fault. I've never heard of
libgcc_s which means it's probably something GCC links against
implicitly. And anyway, if libwhatever.so.1 exists, there should always
be a libwhatever.so symlink to it... right?
I *think* so, but calling
While experimenting with LITE_RUNTIME I noticed that the C++ methods
DebugString() and ShortDebugString() are only present on Message, not
MessageLite.
I understand that DebugString()/ShortDebugString() are implemented via
reflection, which isn't available in the lite runtime, but what about a
Kenton Varda wrote:
On Tue, Aug 18, 2009 at 6:55 PM, Oliver Jowett oliver.jow...@gmail.com
mailto:oliver.jow...@gmail.com wrote:
Hi
Using 2.2.0, the compiler doesn't seem to be generating Java code for
the parseFrom(byte[],int,int) and
parseFrom(byte[],int,int
I'm trying to build 2.2.0 without RTTI support and running into some
obscure problems. The environment is:
$ g++ -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
4.3.3-5ubuntu4'
Oliver Jowett wrote:
#4 0x2b85e3ffb67a in google::protobuf::internal::ReflectionOps::Merge
(fr...@0x262e320, to=0x268f0e0) at ./google/protobuf/message.h:311
#5 0x0071dc4a in protobuf_unittest::ComplexOpt6::MergeFrom
(this=0x268f0e0, fr...@0x262e320) at
google/protobuf
65 matches
Mail list logo