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

Protobuf vs binary plists for network trafficking in a iOS game

I'm developing experimental multiplayer roguelike for iOS. Players will be connected via GameKit API and they'll be put in one dungeon. There is various actions that players can perform, so I want to make one device be a host, and to implement some…
darvin
  • 529
  • 5
  • 17
3
votes
1 answer

in protobuf python api how to add element to nested message repeated property?

message items { message require { optional bool require_sex = 1; // repeated int32 fate = 2 [packed = true]; } optional int32 sub_type = 1; repeated int32 levels = 2 [packed = true]; } I tried…
davyzhang
  • 2,419
  • 3
  • 26
  • 34
3
votes
2 answers

How do I build/install protobuf 2.4.1 on CentOs (or any LINUX/UNIX system)?

Ok, so I'm kind of a complete foreigner in the UNIX/LINUX land, but I need to install profbuf 2.4.1. I was following the instructions by doing wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.bz2 tar xfj protobuf-2.4.1.tar.bz2 pushd…
user113454
  • 2,273
  • 9
  • 28
  • 35
3
votes
1 answer

Is there any community effort towards scala googleprotobuf "bindings"?

Subj. :) Google Protocol Buffer looks like really convenient serialization facilities. However generated java classes are suck not so good: no Option[]s no closures too much copying etc. i.e. it is not Scala :) Are there any known effort towards…
tuxSlayer
  • 2,804
  • 2
  • 20
  • 24
3
votes
1 answer

Why does protostuff corrupt objects when using generics combined with circular references?

I am using protostuff binary with circular references and generics. As a very simplistic scenario i have the following classes: public class A { private String name; private B b; public String getName() { return name; …
3
votes
2 answers

crash during protocol buffers initialization

The following crash observed with my application using protocol buffers 0x00000000 in ?? () 0x08055f43 in google::protobuf::DescriptorPool::InternalAddGeneratedFile ( encoded_file_descriptor=0xf64, size=3940) at once.h:115 0x08072b7a in…
3
votes
1 answer

What's an enum's value if it's required but not in range?

Application A uses a this proto file message The_message { enum The_enum { one = 1; two = 2; } required The_enum the_enum = 1; } Application B uses the next version of the file. It is similar except that it has one more…
deft_code
  • 57,255
  • 29
  • 141
  • 224
3
votes
1 answer

How to define custom compiler for some file type in IntelliJ IDEA?

Is it possible to define custom compiler for particular file type in IntelliJ IDEA ? I found how to define custom formatting though. I have bunch of *.proto files in my project. It would be nice if I have define external executable that compiles…
expert
  • 29,290
  • 30
  • 110
  • 214
3
votes
1 answer

How to support custom options with protobuf-net?

I use protobuf-net and ProtoGen.exe to parse following .proto file (given by another project) enum RGBFlags { FLAG_RED = 1; FLAG_GREEN = 2; FLAG_BLUE = 4; } message SomeMessage { // Values from RGBFlags only allowed optional int32 flags = 2; } …
Michal Sznajder
  • 9,338
  • 4
  • 44
  • 62
3
votes
1 answer

How to squeeze the most performance out of probuf-net

I want to use protobuf-net to serialize stock market data. I'm playing around with following message model: 1st message: Meta Data describing what data to expect and some other info. 2nd message: DataBegin 3rd message: DataItem 4th message:…
lukebuehler
  • 4,061
  • 2
  • 24
  • 28
3
votes
1 answer

Protocol Buffer: How to import?

I have 2 .proto files : First file: package com.test.model; message ProtoModel { required CustomObj custom=1; } Second file: package com.test.model; message CustomObj { required string smth=1; } The issue here is that "CustomObj" is…
Echo
  • 2,959
  • 15
  • 52
  • 65
3
votes
4 answers

How do you transfer binary data with Python?

I'm working on a client-server program for the first time, and I'm feeling woefully inadequate on where to begin for what I'm doing. I'm going to use Google Protocol Buffers to transfer binary data between my client and my server. I'm going to be…
Roger
3
votes
0 answers

Dealing with ts-proto and prost inconsistencies when serializing empty numeric arrays

I find myself in a situation trying to translate a TypeScript codebase to Rust, while maintaining compatibility and not breaking things. On the TypeScript side of things, ts-proto has been used to generate bindings - and on the Rust side I've been…
Haardik
  • 185
  • 2
  • 6
3
votes
0 answers

How to add protocol buffers support to a maven project ?

How to integrate protocol buffers with a maven project ? Couldn't find any information for maven users on the protocol buffers page. I need to add PB support to my web app project with protoc compiler support as well for maven, if it is there.
Rajat Gupta
  • 25,853
  • 63
  • 179
  • 294
3
votes
1 answer

Firebase and Proto causes duplicate class exception

I am using firebase with the following dependencies implementation (platform('com.google.firebase:firebase-bom:30.3.0')) implementation ('com.google.firebase:firebase-analytics-ktx') implementation…
Abhilash
  • 61
  • 5