HEX
Server: LiteSpeed
System: Linux server334.web-hosting.com 4.18.0-553.124.4.lve.el8.x86_64 #1 SMP Fri May 15 13:02:13 UTC 2026 x86_64
User: richfield (1256)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: //lib/python3.6/site-packages/google/protobuf/__pycache__/text_encoding.cpython-36.opt-1.pyc
3

���h	�@s
dZddlZddlZdd�edd�D�Zded<ded	<d
ed<ded
<ded<ded<dd�edd�D�dd�edd�D�dd�edd�D�Zded<ded	<d
ed<ded
<ded<ded<dd�Zejd�Zdd�edd�D�dd�edd�D�Z	dd�Z
dS)zEncoding related utilities.�NcCsg|]}t|��qS�)�chr)�.0�irr�#/usr/lib/python3.6/text_encoding.py�
<listcomp>%sr�z\t�	z\n�
z\r�
z\'�'z\"�"z\\�\cCsg|]}d|�qS)z\%03or)rrrrrr/s� cCsg|]}t|��qSr)r)rrrrrr0s�cCsg|]}d|�qS)z\%03or)rrrrrr1scsLt|tj�rtndd��|r4dj�fdd�|D��Sdj�fdd�|D��S)a-Escape a bytes string for use in an ascii protocol buffer.

  text.encode('string_escape') does not seem to satisfy our needs as it
  encodes unprintable characters using two-digit hex escapes whereas our
  C++ unescaping function allows hex escapes to be any length.  So,
  "1".encode('string_escape') ends up being "\x011", which will be
  decoded in C++ as a single-character string with char code 0x11.

  Args:
    text: A byte string to be escaped
    as_utf8: Specifies if result should be returned in UTF-8 encoding
  Returns:
    Escaped string
  cSs|S)Nr)�xrrr�<lambda>LszCEscape.<locals>.<lambda>�c3s|]}t�|�VqdS)N)�_cescape_utf8_to_str)r�c)�Ordrr�	<genexpr>NszCEscape.<locals>.<genexpr>c3s|]}t�|�VqdS)N)�_cescape_byte_to_str)rr)rrrrOs)�
isinstance�sixZstring_types�ord�join)�textZas_utf8r)rr�CEscape;srz"(\\+)x([0-9a-fA-F])(?![0-9a-fA-F])cCsg|]}t|��qSr)r)rrrrrrSscCsg|]}d|�qS)z\%03or)rrrrrrTscCsPdd�}tj||�}ttkr&|jd�Sdjdd�|D��}|jd�jd�jd	�S)
zDUnescape a text string with C-style escape sequences to UTF-8 bytes.cSs4t|jd��d@r*|jd�d|jd�S|jd�S)N�Zx0�r)�len�group)�mrrr�
ReplaceHexZszCUnescape.<locals>.ReplaceHexZ
string_escapercss|]}tt|�VqdS)N)�_cescape_highbit_to_strr)rrrrrrgszCUnescape.<locals>.<genexpr>�asciiZunicode_escapeZraw_unicode_escape)�_CUNESCAPE_HEX�sub�str�bytes�decoder�encode)rr$�resultrrr�	CUnescapeWs	

r.)�__doc__�rer�rangerrr�compiler'r%r.rrrr�<module>s,&