If I save the packet data as a binary file, I can run it through protoc -decode
to dump the data into a formatted textual representation.
I am wondering if there is any function available to dump the binary data as formatted text programmatically? My code is in JavaScript but C++ is fine as well.
One way would be to spawn protoc
as a background process and get the results back. However, it is not an option for me to bundle protoc
executable itself with my code. Regards.