ok

Mini Shell

Direktori : /opt/alt/python311/lib64/python3.11/encodings/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/encodings/__pycache__/utf_16.cpython-311.opt-1.pyc

�

�ft����dZddlZddlZejZdd�ZGd�dej��ZGd�dej��ZGd	�d
ej	��Z	Gd�dej
��Z
d
�ZdS)z� Python 'utf-16' Codec


Written by Marc-Andre Lemburg (mal@lemburg.com).

(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.

�N�strictc�.�tj||d��S)NT)�codecs�
utf_16_decode)�input�errorss  �7/opt/alt/python311/lib64/python3.11/encodings/utf_16.py�decoder
s�����v�t�4�4�4�c�0�eZdZd	d�Zd
d�Zd�Zd�Zd�ZdS)�IncrementalEncoderrc�T�tj�||��d|_dS�N)rr
�__init__�encoder��selfrs  r	rzIncrementalEncoder.__init__s&���!�*�*�4��8�8�8�����rFc��|j�Utj||j��d}tjdkrtj|_ntj|_|S|�||j��dS)Nr�little)rr�
utf_16_encoder�sys�	byteorder�utf_16_le_encode�utf_16_be_encode)rr�final�results    r	�encodezIncrementalEncoder.encodesf���<���)�%���=�=�a�@�F��}��(�(�%�6����%�6����M��|�|�E�4�;�/�/��2�2rc�R�tj�|��d|_dSr)rr
�resetr�rs r	rzIncrementalEncoder.reset!s$���!�'�'��-�-�-�����rc��|j�dndS)N�r)rr s r	�getstatezIncrementalEncoder.getstate%s��
�\�)���q�1rc��|r	d|_dStjdkrtj|_dStj|_dS�Nr)rrrrrr�r�states  r	�setstatezIncrementalEncoder.setstate,s>���	7��D�L�L�L��}��(�(�%�6�����%�6����rN�r)F)�__name__�
__module__�__qualname__rrrr#r(�rr	r
r
si����������3�3�3�3����2�2�2�7�7�7�7�7rr
c�.�eZdZdd�Zd�Zd�Zd�Zd�ZdS)	�IncrementalDecoderrc�T�tj�||��d|_dSr)r�BufferedIncrementalDecoderr�decoderrs  r	rzIncrementalDecoder.__init__6s&���)�2�2�4��@�@�@�����rc��|j�dtj||d|��\}}}|dkrtj|_n-|dkrtj|_n|dkrtd���||fS|�||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�����a���%�6�����Q���"�#J�K�K�K��H�%�%��|�|�E�4�;��6�6�6rc�R�tj�|��d|_dSr)rr1rr2r s r	rzIncrementalDecoder.resetGs$���)�/�/��5�5�5�����rc���tj�|��d}|j�|dfSt	t
jdk|jtjuk��}||fS)Nrr"�big)rr1r#r2�intrrr9)rr'�addstates   r	r#zIncrementalDecoder.getstateKsk���1�:�:�4�@�@��C��
�<���1�:����
��.����(?�?�A�B�B���x� � rc�8�tj�||��|d}|dkr/tjdkrtjntj|_dS|dkr/tjdkrtjntj|_dSd|_dS)Nr5rr@)rr1r(rrr9r8r2r&s  r	r(zIncrementalDecoder.setstateYs����)�2�2�4��?�?�?��a����A�:�:�"�}��5�5�#�3�3�!'�!8�
�L�L�L��a�Z�Z�"�}��5�5�#�3�3�!'�!8�
�L�L�L� �D�L�L�LrNr))r*r+r,rr=rr#r(r-rr	r/r/5sd����������7�7�7����!�!�!�
 �
 �
 �
 �
 rr/c�$�eZdZdd�Zd�Zdd�ZdS)�StreamWriterrc�V�tj�|||��d|_dSr)rrErr)r�streamrs   r	rzStreamWriter.__init__is(����$�$�T�6�6�:�:�:�����rc�R�tj�|��d|_dSr)rrErrr s r	rzStreamWriter.resetms$����!�!�$�'�'�'�����rc���|j�Jtj||��}tjdkrtj|_ntj|_|S|�||��Sr%)rrrrrrr)rrrrs    r	rzStreamWriter.encodeqsX���<���)�%��8�8�F��}��(�(�%�6����%�6����M��<�<��v�.�.�.rNr))r*r+r,rrrr-rr	rErEhsK�������������	/�	/�	/�	/�	/�	/rrEc��eZdZd�Zdd�ZdS)�StreamReaderc�l�tj�|��	|`dS#t$rYdSwxYwr)rrKrr
�AttributeErrorr s r	rzStreamReader.reset~sI����!�!�$�'�'�'�	�������	�	�	��D�D�	���s�%�
3�3rc���tj||dd��\}}}|dkrtj|_n-|dkrtj|_n|dkrtd���||fS)NrFr4r5r"r6)rr7r8r
r9r:)rrr�objectr<rs      r	r
zStreamReader.decode�sn���#�E�6�1�e�<�<�	&���9���?�?� �1�D�K�K�
�!�^�^� �1�D�K�K�
�q�[�[��F�G�G�G���!�!rNr))r*r+r,rr
r-rr	rKrK|s7���������	"�	"�	"�	"�	"�	"rrKc	�t�tjdtttt
tt���S)Nzutf-16)�namerr
�incrementalencoder�incrementaldecoder�streamreader�streamwriter)r�	CodecInforr
r
r/rKrEr-rr	�getregentryrW�s1����
���-�-�!�!����rr))�__doc__rrrrr
r
r1r/rErKrWr-rr	�<module>rYs������������
�	��5�5�5�5�!7�!7�!7�!7�!7��2�!7�!7�!7�F1 �1 �1 �1 �1 ��:�1 �1 �1 �f/�/�/�/�/�6�&�/�/�/�("�"�"�"�"�6�&�"�"�"�,	�	�	�	�	r

Zerion Mini Shell 1.0