Simplify protobuf encoding a lot