Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Will encoding protobuf messages in 64bit app and decoding in 32bit app work?

Proto n00b. I am encoding protobuf messages in a 64bit app and the receiving side is 32bit app. Such is the architecture at this time, and i am trying to understand if this will work.

Most of the proto scalar types seems to have a size defined except for float and double. So I am thinking this should work. But if there are other things to be concerned about in an environment like this, I know not and hence requesting help.

Thanks!!

like image 376
Fanatic23 Avatar asked Sep 28 '22 00:09

Fanatic23


People also ask

Is protobuf backwards compatible?

It can accept input crafted by later versions of protobuf. The sender is backward compatible because it's creating output that can be consumed by earlier versions. So long as you're careful about when and how you change and remove fields, your protobuf will be forward and backward compatible.

What encoding is protobuf?

Protobuf strings are always valid UTF-8 strings. See the Language Guide: A string must always contain UTF-8 encoded or 7-bit ASCII text. (And ASCII is always also valid UTF-8.)

Is protobuf compressed?

Protobuf achieves good compression ratios through varint encoding. It might not be necessary to add an extra layer of compression in most cases.

What format is protobuf?

Protocol buffers, or Protobuf, is a binary format created by Google to serialize data between different services. Google made this protocol open source and now it provides support, out of the box, to the most common languages, like JavaScript, Java, C#, Ruby and others.


1 Answers

Yes, it will work. The Protobuf encoding is completely independent of architecture.

like image 79
Kenton Varda Avatar answered Oct 06 '22 20:10

Kenton Varda