I needed to quickly encode a protobuf from the command-line, and while I pretty much immediately came across protoc --encode
as the obvious solution, I did not find much documentation on the input textual syntax.
Here is the relevant snippet from protoc --help
:
--encode=MESSAGE_TYPE Read a text-format message of the given type
from standard input and write it in binary
to standard output. The message type must
be defined in PROTO_FILES or their imports.