Questions tagged [protocol-buffers]

For questions about Google's protocol buffers

Protocol buffers are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data – think XML, but smaller, faster, and simpler. You define how you want your data to be structured once, then you can use special generated source code to easily write and read your structured data to and from a variety of data streams and using a variety of languages.

https://developers.google.com/protocol-buffers

7638 questions
4
votes
1 answer

How to send / receive binary data serialized with Protocol Buffers using ZMQ

I need to send an object (serialized with GPB) on a ZMQ socket. Currently the code have an extra copy. How do I directly write serialized array into message_ts data? ABT_CommunicationProtocol introPacket; // Fill the packet message_t…
sorush-r
  • 10,490
  • 17
  • 89
  • 173
4
votes
2 answers

Protobuf 2.5.0 bug?

I've migrated from google protobuf v. 2.4.1 to v. 2.5.0 (no other change). I had a perfectly working client-server [android<>gae dev server] communication using 2.4.1. Now with 2.5.0 it is broken. Without any modification to the .proto file, I've…
Amir Uval
  • 14,425
  • 4
  • 50
  • 74
4
votes
2 answers

Protocol buffer - usecases

I tried reading Protobuf docs, but couldn't imagine many usecases it can be used. I would like to know some real-world performance improvement usecases of protocol buffer . Thanks
Sagar
  • 5,315
  • 6
  • 37
  • 66
4
votes
2 answers

protobuf: RepeatedField unique elements

I want to have in a google protocol buffer repeated field only unique elements. In other words, need to use it as a std::set instead of std::vector. Any idea which is the simplest and most efficient way to do that? EDIT: I wouldn't want to use any…
Alex
  • 409
  • 5
  • 12
4
votes
2 answers

Reading and writing structs remotely

I'm currently building a robot which has some sensors attached to it. The control unit on the robot is an ARM Cortex-M3, all sensors are attached to it and it is connected via Ethernet to the "ground station". Now I want to read and write settings…
sled
  • 14,525
  • 3
  • 42
  • 70
4
votes
2 answers

What am I missing in this Proguard configuration for Android?

I've tried countless things but I'm not being able to prevent my app to crash while using Proguard to shrink the code (obfuscation is disabled). I always get the following exception when Proguard is enabled: 04-03 10:26:37.277…
rfgamaral
  • 16,546
  • 57
  • 163
  • 275
4
votes
1 answer

variable named TYPE_BOOL(c++ code) is conflicted with ios macro

I'm trying to build protobuf c++ into ios. But its implementation contains a TYPE_BOOL enum variable that conflicts with TYPE_BOOL in ios macro. And compile failed. How to solve this?
lseeo
  • 799
  • 2
  • 9
  • 15
4
votes
1 answer

Error building protocol buffer with the Android NDK

I try to build the protocol buffer library in the Android NDK (full lib). (How to build protocol buffer by Android NDK). But when I execute ndk-build, I get an error ... Compile++ thumb : protobuf <= printer.cc Compile++ thumb : protobuf <=…
Aleksandr
  • 1,303
  • 2
  • 11
  • 19
4
votes
2 answers

Protocol Buffer Challenge

I am developing an application that uses the protocol buffer as a serializer . My application will be a client to a server. The requirement is that before sending the protobuf data I have to prepend the size of the protobuf data with 4 bytes. I am…
Arsene
  • 1,037
  • 4
  • 20
  • 47
4
votes
1 answer

Best practices for sharing contracts when using Google Protocol Buffers?

What are some effective ways to share contracts between peer applications, when using Google Protobuffers as the transport? Have any best practices emerged?
James L
  • 16,456
  • 10
  • 53
  • 70
4
votes
2 answers

Google Protocol Buffers - protobuf-net deserialization not working properly

I am experiencing difficulties successfully deserializing a byte array that had been serialized with a pre-compiled protobuff serializer class ModelSerializer. Using this, the serialization and deserialization of classes within my defined data model…
Nicholas Ang
  • 41
  • 2
  • 2
4
votes
1 answer

Serializing and Deserializing with Polymorphism and Protobuf-net

I'm trying to use protobuf-net to serialize objects. I'm not sure if what I'm trying to do with inheritance is supported, but I thought I'd check and see if it is or if I'm just doing something wrong. Essentially, I'm trying to serialize some child…
Cornstalks
  • 37,137
  • 18
  • 79
  • 144
4
votes
1 answer

What other libraries does protobuf c++ depend on to compile the runtime?

I just had a quick look at the documentation and the C++ source of the protocol buffers and I could not find any library requirements to build the protobuf runtime - either as shared library or static library. Does anyone know what the requirements…
rui
  • 11,015
  • 7
  • 46
  • 64
4
votes
3 answers

When using google protocol buffers to transfer String character,got messy code

In debug view: Here is the code which encodes into messy string... ((S2CEnterCollection)objS2c).toByteString().toStringUtf8(); Output: ���"default( ���"default( ���"default( ���"default( ���"default( ����"default( …
Ryan Zhu
  • 543
  • 3
  • 9
  • 20
4
votes
2 answers

Protobuf-net deserialization exception with enum

I have an enum with flags that I decorate with the [ProtoMember] attribute that serializes and deserializes fine on my local box running Win7 x64. However my use case involves serializing on a server running Windows Server 2008 R2 Enterprise 64-bit…
JohnC
  • 335
  • 3
  • 12