Protobuf


# Distribute protobuf files

A general idea is to distribute .proto files via a git repo and managing releases from this central place.

What this does is:

References are:

# Useful tools

# Tips and tricks

## Decode protobuf bytes locally

### With unknown type

1
2
3
4
5
echo '22 05 68 65 6c 6c 6f' \
  | xxd -r -p \
  | protoc --decode_raw

4: "hello"

### With known type

Content of test.proto

1
2
3
message Test {
  optional string s = 4;
}
1
2
3
4
5
echo '22 05 68 65 6c 6c 6f' \
  | xxd -r -p \
  | protoc --decode Test ./test.proto

s: "hello"

Nothing in here at the moment.