python - Differentiate between strings and embedded messages -


As an exercise I am trying to write a GPB decoder. The document is of the same type as string and embedded message (among other), how do you differentiate between string and embedded messages? In my opinion, a string must be decoded using a different method than an embedded message.

This information is explained in the .proto file. In order to properly decode a protob message, the decoder will already know the type of message and accordingly the .proto file is available.

.proto The file can be easily compiled first by using the file protoc and then read the output file, Has defined proto-message. In this file, the identifier explains the difference between types using the same wire_type in the identifier TYPE_MESSAGE and TYPE_STRING encoding.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -