def _TagSize(field_number): """Returns the number of bytes required to serialize a tag with this field number.""" return _VarintSize(wire_format.PackTag(field_number, 0))
def TagBytes(field_number, wire_type): """Encode the given tag and return the bytes. Only called at startup.""" return _VarintBytes(wire_format.PackTag(field_number, wire_type))