ok

Mini Shell

Direktori : /proc/self/root/opt/alt/python37/lib64/python3.7/encodings/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python37/lib64/python3.7/encodings/__pycache__/utf_16.cpython-37.pyc

B

�x�ct�@sxdZddlZddlZejZddd�ZGdd�dej�ZGdd	�d	ej�ZGd
d�dej	�Z	Gdd
�d
ej
�Z
dd�ZdS)z� Python 'utf-16' Codec


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

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

�N�strictcCst�||d�S)NT)�codecs�
utf_16_decode)�input�errors�r�5/opt/alt/python37/lib64/python3.7/encodings/utf_16.py�decodesr	c@s8eZdZddd�Zddd�Zdd�Zd	d
�Zdd�Zd
S)�IncrementalEncoderrcCstj�||�d|_dS)N)rr
�__init__�encoder)�selfrrrrrszIncrementalEncoder.__init__FcCsN|jdkr<t�||j�d}tjdkr0tj|_ntj|_|S|�||j�dS)Nr�little)rr�
utf_16_encoder�sys�	byteorder�utf_16_le_encode�utf_16_be_encode)r
r�final�resultrrr�encodes


zIncrementalEncoder.encodecCstj�|�d|_dS)N)rr
�resetr)r
rrrr!szIncrementalEncoder.resetcCs|jdkrdSdS)N�r)r)r
rrr�getstate%szIncrementalEncoder.getstatecCs,|rd|_ntjdkr tj|_ntj|_dS)Nr)rrrrrr)r
�staterrr�setstate,s


zIncrementalEncoder.setstateN)r)F)�__name__�
__module__�__qualname__rrrrrrrrrr
s



r
c@s6eZdZd
dd�Zdd�Zdd�Zdd	�Zd
d�ZdS)�IncrementalDecoderrcCstj�||�d|_dS)N)r�BufferedIncrementalDecoderr�decoder)r
rrrrr6szIncrementalDecoder.__init__cCsl|jdkr\t�||d|�\}}}|dkr2tj|_n"|dkrDtj|_n|dkrTtd��||fS|�||j|�S)Nr����rz%UTF-16 stream does not start with BOM)r!r�utf_16_ex_decode�utf_16_le_decode�utf_16_be_decode�UnicodeErrorr)r
rrr�output�consumedrrrr�_buffer_decode:s


z!IncrementalDecoder._buffer_decodecCstj�|�d|_dS)N)rr rr!)r
rrrrGszIncrementalDecoder.resetcCsDtj�|�d}|jdkr"|dfSttjdk|jtjkk�}||fS)Nrr�big)rr rr!�intrrr&)r
rZaddstaterrrrKs

zIncrementalDecoder.getstatecCsdtj�||�|d}|dkr8tjdkr.tjntj|_n(|dkrZtjdkrPtjntj|_nd|_dS)Nr#rr+)rr rrrr&r%r!)r
rrrrrYs

zIncrementalDecoder.setstateN)r)rrrrr*rrrrrrrr5s


rc@s(eZdZd	dd�Zdd�Zd
dd�ZdS)�StreamWriterrcCstj�|||�d|_dS)N)rr-rr)r
�streamrrrrriszStreamWriter.__init__cCstj�|�d|_dS)N)rr-rr)r
rrrrmszStreamWriter.resetcCsF|jdkr6t�||�}tjdkr*tj|_ntj|_|S|�||�SdS)Nr)rrrrrrr)r
rrrrrrrqs


zStreamWriter.encodeN)r)r)rrrrrrrrrrr-hs
r-c@seZdZdd�Zddd�ZdS)�StreamReadercCs.tj�|�y|`Wntk
r(YnXdS)N)rr/rr	�AttributeError)r
rrrr~s
zStreamReader.resetrcCsRt�||dd�\}}}|dkr(tj|_n"|dkr:tj|_n|dkrJtd��||fS)NrFr"r#rz%UTF-16 stream does not start with BOM)rr$r%r	r&r')r
rr�objectr)rrrrr	�s

zStreamReader.decodeN)r)rrrrr	rrrrr/|sr/c	Cstjdttttttd�S)Nzutf-16)�namerr	�incrementalencoder�incrementaldecoder�streamreader�streamwriter)r�	CodecInforr	r
rr/r-rrrr�getregentry�sr8)r)�__doc__rrrrr	r
r rr-r/r8rrrr�<module>s
#3

Zerion Mini Shell 1.0