Using uint8t with cpp-protobuf

Viewed 28
  1. I have a use-case where I have to convert std::vector<uint8_t> to/from std::string for sending protobuf data. I understand C++ protobuf has APIs SerializeToString and ParseFromString. But these are part of C++ Message objects/reflection which I don't want to use.

Is there any generic way (API) to achieve the same as above as these are standard string (de)encodings provided by Google.

  1. Does SerializeToString always result in a utf8 string?
0 Answers
Related