Your IP : 18.224.73.107


Current Path : /opt/alt/python312/lib64/python3.12/encodings/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/encodings/__pycache__/utf_16.cpython-312.opt-2.pyc

�

�Q�ft����	ddlZddlZejZdd�ZGd�dej
�ZGd�dej�ZGd�dej�ZGd	�d
ej�Z	d�Z
y)
�Nc�0�tj||d�S)NT)�codecs�
utf_16_decode)�input�errorss  �7/opt/alt/python312/lib64/python3.12/encodings/utf_16.py�decoder	s������v�t�4�4�c�.�eZdZdd�Zdd�Zd�Zd�Zd�Zy)	�IncrementalEncoderc�R�tjj||�d|_y�N)rr�__init__�encoder��selfrs  rrzIncrementalEncoder.__init__s���!�!�*�*�4��8���r
c� �|j�dtj||j�d}tj
dk(rtj|_|Stj|_|S|j||j�dS)Nr�little)rr�
utf_16_encoder�sys�	byteorder�utf_16_le_encode�utf_16_be_encode)rr�final�results    r�encodezIncrementalEncoder.encodesu���<�<���)�)�%����=�a�@�F��}�}��(�%�6�6����M� &�6�6����M��|�|�E�4�;�;�/��2�2r
c�P�tjj|�d|_yr)rr�resetr�rs rrzIncrementalEncoder.reset!s���!�!�'�'��-���r
c�"�|j�dSdS)N�r)rrs r�getstatezIncrementalEncoder.getstate%s��
�\�\�)��1�q�1r
c��|rd|_ytjdk(rtj|_ytj
|_y�Nr)rrrrrr�r�states  r�setstatezIncrementalEncoder.setstate,s2����D�L��}�}��(�%�6�6���%�6�6��r
N��strict)F)�__name__�
__module__�__qualname__rrrr"r'�r
rrrs���3��2�7r
rc�,�eZdZdd�Zd�Zd�Zd�Zd�Zy)�IncrementalDecoderc�R�tjj||�d|_yr)r�BufferedIncrementalDecoderr�decoderrs  rrzIncrementalDecoder.__init__6s���)�)�2�2�4��@���r
c�,�|j�ltj||d|�\}}}|dk(rtj|_||fS|dk(rtj|_||fS|dk\rtd��||fS|j||j|�S)Nr����r!�%UTF-16 stream does not start with BOM)r2r�utf_16_ex_decode�utf_16_le_decode�utf_16_be_decode�UnicodeErrorr)rrrr�output�consumedrs       r�_buffer_decodez!IncrementalDecoder._buffer_decode:s����<�<���'�'��v�q�%�@�
*�V�X�y��B��%�6�6���
�H�%�%�	�a��%�6�6����H�%�%��Q��"�#J�K�K��H�%�%��|�|�E�4�;�;��6�6r
c�P�tjj|�d|_yr)rr1rr2rs rrzIncrementalDecoder.resetGs���)�)�/�/��5���r
c���tjj|�d}|j�|dfSt	t
jdk(|jtjuk7�}||fS)Nrr!�big)rr1r"r2�intrrr9)rr&�addstates   rr"zIncrementalDecoder.getstateKsn���1�1�:�:�4�@��C��
�<�<���1�:����
�
��.�����(?�(?�?�A�B���x� � r
c�l�tjj||�|d}|dk(r?tjdk(rtj
|_ytj|_y|dk(r?tjdk(rtj|_ytj
|_yd|_y)Nr5rr@)rr1r'rrr9r8r2r%s  rr'zIncrementalDecoder.setstateYs����)�)�2�2�4��?��a����A�:�"�}�}��5�#�3�3�D�L�!'�!8�!8�
�L��a�Z�"�}�}��5�#�3�3�D�L�!'�!8�!8�
�L� �D�Lr
Nr()r*r+r,rr=rr"r'r-r
rr/r/5s���7��!�
 r
r/c�"�eZdZdd�Zd�Zdd�Zy)�StreamWriterc�T�tjj|||�d|_yr)rrErr)r�streamrs   rrzStreamWriter.__init__is!�����$�$�T�6�6�:���r
c�P�tjj|�d|_yr)rrErrrs rrzStreamWriter.resetms�����!�!�$�'���r
c���|j�Wtj||�}tjdk(rtj
|_|Stj|_|S|j||�Sr$)rrrrrrr)rrrrs    rrzStreamWriter.encodeqsc���<�<���)�)�%��8�F��}�}��(�%�6�6����M� &�6�6����M��<�<��v�.�.r
Nr()r*r+r,rrrr-r
rrErEhs����	/r
rEc��eZdZd�Zdd�Zy)�StreamReaderc�f�tjj|�	|`y#t$rYywxYwr)rrKrr	�AttributeErrorrs rrzStreamReader.reset~s2�����!�!�$�'�	�����	��	�s�$�	0�0c���tj||dd�\}}}|dk(rtj|_||fS|dk(rtj|_||fS|dk\rtd��||fS)NrFr4r5r!r6)rr7r8r	r9r:)rrr�objectr<rs      rr	zStreamReader.decode�s����#�#�E�6�1�e�<�	&���9���?� �1�1�D�K�
��!�!�	�!�^� �1�1�D�K���!�!��q�[��F�G�G���!�!r
Nr()r*r+r,rr	r-r
rrKrK|s���	"r
rKc	�j�tjdtttt
tt��S)Nzutf-16)�namerr	�incrementalencoder�incrementaldecoder�streamreader�streamwriter)r�	CodecInforr	rr/rKrEr-r
r�getregentryrW�s*�����
���-�-�!�!��r
r()rrrrr	rr1r/rErKrWr-r
r�<module>rXsp����
�	�	��5�!7��2�2�!7�F1 ��:�:�1 �f/�6�&�&�/�("�6�&�&�"�,	r

?>