HEX
Server: LiteSpeed
System: Linux server.nevid-deploma.com 4.18.0-553.111.1.lve.el8.x86_64 #1 SMP Fri Mar 13 13:42:17 UTC 2026 x86_64
User: smilepac (1037)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //opt/cppython/lib/python3.8/site-packages/google/protobuf/__pycache__/text_encoding.cpython-38.pyc
U

ID�g%�@s�dZddlZdd�Zdd�Ze�Zdd�edd	�D�Ze�e�e�d
d�edd	�D��dd
�Ze	d�dd�Z
e�d�Ze	e
d�dd�ZdS)zEncoding related utilities.�NcCs|dko|dkS)N� ��)�irr�J/opt/cppython/lib/python3.8/site-packages/google/protobuf/text_encoding.py�
_AsciiIsPrintsrcCsti}tdd�D]}t|�sd|||<qd|td�<d|td�<d|td	�<d
|td�<d|td
�<d|td�<|S)Nr��\%03oz\t�	z\n�
z\r�
z\"�"z\'�'z\\�\)�ranger�ord)�retrrrr�_MakeStrEscapessrcCsi|]}|t|��qSr)�chr��.0rrrr�
<dictcomp>sr�cCsi|]}|d|�qS)r	rrrrrr!src
Cs�d}|r�z||�d��t�7}d}Wqtk
r�}zF||d|j��d��t�7}|t||j7}||jdd�}W5d}~XYqXq|S)N��utf-8�)�decode�	translate�_str_escapes�UnicodeDecodeError�start�
_byte_escapes)Z
text_bytesr�errr�_DecodeUtf8EscapeErrors$s&r#)�returncCsLt|t�}|r&|r|�t�St|�Sn"|r4|�d�}d�dd�|D��SdS)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).
  rrcSsg|]}t|�qSr)r!)r�crrr�
<listcomp>JszCEscape.<locals>.<listcomp>N)�
isinstance�strrrr#�encode�join)�textZas_utf8Ztext_is_unicoderrr�CEscape1s



r,z"(\\+)x([0-9a-fA-F])(?![0-9a-fA-F]))r+r$cCs>dd�}t�||�}|�d��d�}|�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)NrZx0�r)�len�group)�mrrr�
ReplaceHexYszCUnescape.<locals>.ReplaceHexZraw_unicode_escaperZunicode_escapezlatin-1)�_CUNESCAPE_HEX�subr)r)r+r1�resultrrr�	CUnescapePs
		r5)�__doc__�rerrrrr!�updater#r(r,�compiler2�bytesr5rrrr�<module>s