Search code examples
protocol-buffers

Is there a way to determine if a byte-stream is built using protobuf?


Just wondering if there's some sort of special starting characters in a byte stream so I can detect that it is a protobuf message?


Solution

  • Nope. The encoding format doesn't have anything like that. Including such a thing would have been too much overhead for small messages, and too unreliable to be useful.