Functions | Variables
google.protobuf.text_encoding Namespace Reference

Functions

def CEscape (text, as_utf8)
 
def CUnescape (text)
 

Variables

tuple _cescape_byte_to_str
 
dictionary _cescape_chr_to_symbol_map = {}
 
list _cescape_unicode_to_str = [chr(i) for i in range(0, 256)]
 
 _CUNESCAPE_HEX = re.compile(r'(\\+)x([0-9a-fA-F])(?![0-9a-fA-F])')
 

Function Documentation

◆ CEscape()

def google.protobuf.text_encoding.CEscape (   text,
  as_utf8 
)
Escape a bytes string for use in an text protocol buffer.

Args:
  text: A byte string to be escaped.
  as_utf8: Specifies if result may contain non-ASCII characters.
      In Python 3 this allows unescaped non-ASCII Unicode characters.
      In Python 2 the return value will be valid UTF-8 rather than only ASCII.
Returns:
  Escaped string (str).

Definition at line 58 of file bloaty/third_party/protobuf/python/google/protobuf/text_encoding.py.

◆ CUnescape()

def google.protobuf.text_encoding.CUnescape (   text)
Unescape a text string with C-style escape sequences to UTF-8 bytes.

Args:
  text: The data to parse in a str.
Returns:
  A byte string.

Definition at line 91 of file bloaty/third_party/protobuf/python/google/protobuf/text_encoding.py.

Variable Documentation

◆ _cescape_byte_to_str

tuple google.protobuf.text_encoding._cescape_byte_to_str
private
Initial value:
1 = ([r'\%03o' % i for i in range(0, 32)] +
2  [chr(i) for i in range(32, 127)] +
3  [r'\%03o' % i for i in range(127, 256)])

Definition at line 50 of file bloaty/third_party/protobuf/python/google/protobuf/text_encoding.py.

◆ _cescape_chr_to_symbol_map

dictionary google.protobuf.text_encoding._cescape_chr_to_symbol_map = {}
private

◆ _cescape_unicode_to_str

list google.protobuf.text_encoding._cescape_unicode_to_str = [chr(i) for i in range(0, 256)]
private

◆ _CUNESCAPE_HEX

google.protobuf.text_encoding._CUNESCAPE_HEX = re.compile(r'(\\+)x([0-9a-fA-F])(?![0-9a-fA-F])')
private
capstone.range
range
Definition: third_party/bloaty/third_party/capstone/bindings/python/capstone/__init__.py:6


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:29