Skip to content

Latest commit

 

History

History

protoc

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Protoc

--decode_raw

Read an arbitrary protocol message from standard input and write the raw tag/value pairs in text format to standard output. No PROTO_FILES should be given when using this flag.

Example usage

cat simple.bin | protoc --decode_raw

--decode

Read a binary message of the given type from standard input and write it in text format to standard output. The message type must be defined in PROTO_FILES or their imports.

Example usage

cat simple.bin | protoc --decode=Simple simple.proto > simple.txt
cat simple.bin | protoc --decode=simple.Simple simple.proto > simple.txt

--encode

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.

Example usage

cat simple.txt | protoc --encode=Simple simple.proto > simple.pb
cat simple.txt | protoc --encode=simple.Simple simple.proto > simple.pb