1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00

protoc: add encode/decode commands (#15734)

This commit is contained in:
Valentin Vetter 2025-02-15 17:49:25 +01:00 committed by GitHub
parent 27bdd850a1
commit a824cd5658
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -14,3 +14,15 @@
- Generate code for multiple languages:
`protoc --csharp_out={{path/to/c#_output_directory}} --js_out={{path/to/js_output_directory}} {{input_file.proto}}`
- Encode a text-format message into a protocol message from a `.proto` file:
`protoc --encode={{TypeName}} {{input_file.proto}} < {{message.txt}}`
- Decode a protocol message into text-format from a `.proto` file:
`protoc --decode={{TypeName}} {{input_file.proto}} < {{message.bin}}`
- Decode a protocol message into raw tag/value pairs:
`protoc --decode_raw < {{message.bin}}`