Your IP : 13.59.68.161


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

o

6��f#�@s�dZddlZddlZddlmZddd�Zdd	d
�ZGdd�dej�ZGd
d�dej�ZGdd�dej	�Z	Gdd�deej
�Z
Gdd�deej�Zdd�ZdS)aPython 'uu_codec' Codec - UU content transfer encoding.

This codec de/encodes from bytes to bytes.

Written by Marc-Andre Lemburg (mal@lemburg.com). Some details were
adapted from uu.py which was written by Lance Ellinghouse and
modified by Jack Jansen and Fredrik Lundh.
�N)�BytesIO�strict�<data>�c	Cs�|dksJ�t|�}t�}|j}|j}|�dd�}|�dd�}|d|d@|f�d��|d	�}|r?|t�|��|d	�}|s2|d
�|��t|�fS)Nr�
z\n�
z\rzbegin %o %s
i��ascii�-s 
end
)	r�read�write�replace�encode�binasciiZb2a_uu�getvalue�len)	�input�errors�filename�mode�infile�outfiler
r�chunk�r�9/opt/alt/python310/lib64/python3.10/encodings/uu_codec.py�	uu_encodes�rc

Cs�|dksJ�t|�}t�}|j}|j}	|�}|std��|dd�dkr&nq	|�}|r1|dkr2n7zt�|�}Wn*tjyc}z|dd	d
@ddd}	t�|d|	��}WYd}~nd}~ww||�q(|sotd
��|��t|�fS)Nr�z"Missing "begin" line in input data�sbeginTsend
r� �?��zTruncated input data)	r�readliner�
ValueErrorrZa2b_uu�Errorrr)
rrrrr!r�s�data�v�nbytesrrr�	uu_decode%s8����r(c@s eZdZddd�Zddd�ZdS)�CodecrcC�
t||�S�N)r��selfrrrrrr
G�
zCodec.encodecCr*r+)r(r,rrr�decodeJr.zCodec.decodeN�r)�__name__�
__module__�__qualname__r
r/rrrrr)Fs
r)c@�eZdZddd�ZdS)�IncrementalEncoderFcC�t||j�dS�Nr)rr�r-r�finalrrrr
N�zIncrementalEncoder.encodeN�F)r1r2r3r
rrrrr5M�r5c@r4)�IncrementalDecoderFcCr6r7)r(rr8rrrr/Rr:zIncrementalDecoder.decodeNr;)r1r2r3r/rrrrr=Qr<r=c@�eZdZeZdS)�StreamWriterN�r1r2r3�bytes�charbuffertyperrrrr?U�r?c@r>)�StreamReaderNr@rrrrrDXrCrDc
Cstjdttttttdd�S)N�uuF)�namer
r/�incrementalencoder�incrementaldecoder�streamreader�streamwriter�_is_text_encoding)�codecs�	CodecInforr(r5r=rDr?rrrr�getregentry]s�rN)rrrr0)
�__doc__rLr�iorrr(r)r5r=r?rDrNrrrr�<module>s	

!

?>