protobuf implementated in pure python