Created
April 17, 2019 16:53
-
-
Save ladyrick/8935cf6c4f4519faccca2d76cdb94a86 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from google.protobuf import text_format | |
def ParseFromBinary(bytestr, message): | |
message.ParseFromString(bytestr) | |
def ParseFromText(string, message): | |
text_format.Merge(string, message) | |
def SerializeToBinary(message): | |
return message.SerializeToString() | |
def SerializeToText(message): | |
return text_format.MessageToString(message) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment