Your IP : 18.191.67.90


Current Path : /opt/alt/python310/lib64/python3.10/encodings/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/encodings/__pycache__/utf_16.cpython-310.opt-2.pyc

o

6��ft�@sv	ddlZddlZejZddd�ZGdd�dej�ZGdd�dej�ZGd	d
�d
ej�ZGdd�dej	�Z	d
d�Z
dS)�N�strictcCst�||d�S)NT)�codecs�
utf_16_decode)�input�errors�r�7/opt/alt/python310/lib64/python3.10/encodings/utf_16.py�decodesr	c@s8eZdZddd�Zddd�Zdd�Zd	d
�Zdd�Zd
S)�IncrementalEncoderrcC�tj�||�d|_dS�N)rr
�__init__�encoder��selfrrrrr
�
zIncrementalEncoder.__init__FcCsP|jdurt�||j�d}tjdkrtj|_|Stj|_|S|�||j�dS)Nr�little)rr�
utf_16_encoder�sys�	byteorder�utf_16_le_encode�utf_16_be_encode)rr�final�resultrrr�encodes

�zIncrementalEncoder.encodecC�tj�|�d|_dSr)rr
�resetr�rrrrr!�
zIncrementalEncoder.resetcCs|jdurdSdS)N�r)rrrrr�getstate%szIncrementalEncoder.getstatecCs0|rd|_dStjdkrtj|_dStj|_dS�Nr)rrrrrr�r�staterrr�setstate,s


zIncrementalEncoder.setstateN�r)F)�__name__�
__module__�__qualname__r
rrr r$rrrrr
s


r
c@s6eZdZd
dd�Zdd�Zdd�Zdd	�Zd
d�ZdS)�IncrementalDecoderrcCrr)r�BufferedIncrementalDecoderr
�decoderrrrrr
6rzIncrementalDecoder.__init__cCsx|jdur4t�||d|�\}}}|dkrtj|_||fS|dkr(tj|_||fS|dkr0td��||fS|�||j|�S)Nr����r�%UTF-16 stream does not start with BOM)r+r�utf_16_ex_decode�utf_16_le_decode�utf_16_be_decode�UnicodeErrorr)rrrr�output�consumedrrrr�_buffer_decode:s
���z!IncrementalDecoder._buffer_decodecCrr)rr*rr+rrrrrGrzIncrementalDecoder.resetcCsDtj�|�d}|jdur|dfSttjdk|jtjuk�}||fS)Nrr�big)rr*r r+�intrrr1)rr#Zaddstaterrrr Ks


�zIncrementalDecoder.getstatecCsttj�||�|d}|dkr tjdkrtj|_dStj|_dS|dkr5tjdkr/tj|_dStj|_dSd|_dS)Nr-rr6)rr*r$rrr1r0r+r"rrrr$Ys
��
��
zIncrementalDecoder.setstateNr%)r&r'r(r
r5rr r$rrrrr)5s

r)c@s(eZdZd	dd�Zdd�Zd	dd�ZdS)
�StreamWriterrcCstj�|||�d|_dSr)rr8r
r)r�streamrrrrr
is
zStreamWriter.__init__cCrr)rr8rrrrrrrmrzStreamWriter.resetcCsD|jdurt�||�}tjdkrtj|_|Stj|_|S|�||�Sr!)rrrrrrr)rrrrrrrrqs

�zStreamWriter.encodeNr%)r&r'r(r
rrrrrrr8hs
r8c@seZdZdd�Zddd�ZdS)�StreamReadercCs,tj�|�z|`WdStyYdSwr)rr:rr	�AttributeErrorrrrrr~s
�zStreamReader.resetrcCs^t�||dd�\}}}|dkrtj|_||fS|dkr#tj|_||fS|dkr+td��||fS)NrFr,r-rr.)rr/r0r	r1r2)rrr�objectr4rrrrr	�s���zStreamReader.decodeNr%)r&r'r(rr	rrrrr:|sr:c	Cstjdttttttd�S)Nzutf-16)�namerr	�incrementalencoder�incrementaldecoder�streamreader�streamwriter)r�	CodecInforr	r
r)r:r8rrrr�getregentry�s�rCr%)rrrrr	r
r*r)r8r:rCrrrr�<module>s
#3

?>