Protocol buffers: no designations for fixed-size buffers?

Since I do not get the answer to this question, I have to prototype and test myself, since my dataset headers must be of fixed size, I need fixed-size rows. So, is it possible to specify fixed-size strings or byte arrays in protocol buffers? This is not entirely obvious here, and I kind of feel bad about forcing fixed-size strings in the header message. --ie, std::string('\0', 128);

If not, I would rather use #pragma pack(1) struct header {...};'

change

The question is indirectly answered here . Answer and except

+5
source share
2

protobuf , .proto. ( varint-, ).

, - , . , protobuf unicode UTF-8, , ( ASCII).

+2

. UTF-8, . , . . https://developers.google.com/protocol-buffers/docs/encoding/.

, , , , , (Ie Java String ByteArray ).

0

All Articles