zmc
2023-08-08 e792e9a60d958b93aef96050644f369feb25d61b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
U
£ý°dæã@sædZddlZiZded<ded<ded<d    ed
<d ed <d ed<dd„eddƒDƒZe ¡D]\ZZeee<q\dd„eddƒDƒdd„eddƒDƒdd„eddƒDƒZe ¡D]\ZZeee<q²[[dd„Z    e 
d¡Z dd„Z dS)zEncoding related utilities.éNz\té    z\né
z\ré z\"é"z\'é'z\\é\cCsg|] }t|ƒ‘qS©©Úchr©Ú.0ÚirrúTd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\google/protobuf/text_encoding.pyÚ
<listcomp>+srécCsg|] }d|‘qS©z\%03orr rrrr0sé cCsg|] }t|ƒ‘qSrr    r rrrr1sécCsg|] }d|‘qSrrr rrrr2scs`t|tƒ}|r|r| t¡S|r$tndd„‰|rHd ‡fdd„|Dƒ¡Sd ‡fdd„|Dƒ¡S)amEscape 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).
  cSs|S©Nr)ÚxrrrÚ<lambda>MózCEscape.<locals>.<lambda>Úc3s|]}tˆ|ƒVqdSr)Ú_cescape_unicode_to_str©r Úc©Zord_rrÚ    <genexpr>OszCEscape.<locals>.<genexpr>c3s|]}tˆ|ƒVqdSr)Ú_cescape_byte_to_strrrrrrPs)Ú
isinstanceÚstrÚ    translateÚ_cescape_chr_to_symbol_mapÚordÚjoin)ÚtextZas_utf8Ztext_is_unicoderrrÚCEscape8s
 
r&z"(\\+)x([0-9a-fA-F])(?![0-9a-fA-F])cCs*dd„}t ||¡}| d¡ d¡ d¡S)z”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.
  cSs4t| d¡ƒd@r*| d¡d| d¡S| d¡S)NéZx0ér)ÚlenÚgroup)ÚmrrrÚ
ReplaceHex`szCUnescape.<locals>.ReplaceHexzutf-8Zunicode_escapeZraw_unicode_escape)Ú_CUNESCAPE_HEXÚsubÚencodeÚdecode)r%r,ÚresultrrrÚ    CUnescapeVs
     
ÿýr2) Ú__doc__Úrer"ÚrangerÚitemsÚbyteÚstringrr&Úcompiler-r2rrrrÚ<module>s,
ÿþ