Your IP : 18.226.187.224


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

�

�Q�f#���dZddlZddlZddlmZdd�Zdd�ZGd�dej�ZGd�d	ej�ZGd
�dej�Z	Gd�d
eej�Z
Gd�deej�Zd�Zy)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)�BytesIOc��|dk(sJ�t|�}t�}|j}|j}|jdd�}|jdd�}|d|dz|fzj	d��|d	�}|r&|tj|��|d	�}|r�&|d
�|j�t|�fS)N�strict�
z\n�
z\rzbegin %o %s
i��ascii�-s 
end
)	r�read�write�replace�encode�binascii�b2a_uu�getvalue�len)	�input�errors�filename�mode�infile�outfiler
r�chunks	         �9/opt/alt/python312/lib64/python3.12/encodings/uu_codec.py�	uu_encoders����X����
�U�^�F��i�G��;�;�D��M�M�E�����U�+�H�����U�+�H�
�?�d�U�l�H�5�5�
=�
=�g�
F�G���H�E�
�
�h�o�o�e�$�%��R����
�+�������E�
�+�+�c���|dk(sJ�t|�}t�}|j}|j}	|�}|std��|dddk(rn�	|�}|r|dk(rn	t	j
|�}||��.|std��|j�t|�fS#tj$r6}|ddz
dzd	zdzd
z}	t	j
|d|	�}Yd}~�ud}~wwxYw)Nrz"Missing "begin" line in input data�sbeginsend
r� �?��zTruncated input data)	r�readliner�
ValueErrorr�a2b_uu�Errorrr)
rrrrr"r�s�data�v�nbytess
          r�	uu_decoder*%s���X����
�U�^�F��i�G����H��M�M�E���J����A�B�B��R�a�5�H������J���A��M��	/��?�?�1�%�D�	�d���
��/�0�0������E�
�+�+���~�~�	/��!��R��2�~��*�Q�.�1�4�F��?�?�1�W�f�:�.�D��	/�s�%B+�+C4�>,C/�/C4c��eZdZdd�Zdd�Zy)�Codecc��t||�S�N)r��selfrrs   rr
zCodec.encodeG������'�'rc��t||�Sr.)r*r/s   r�decodezCodec.decodeJr1rN�r)�__name__�
__module__�__qualname__r
r3�rrr,r,Fs��(�(rr,c��eZdZdd�Zy)�IncrementalEncoderc�4�t||j�dS�Nr)rr�r0r�finals   rr
zIncrementalEncoder.encodeN��������,�Q�/�/rN�F)r5r6r7r
r8rrr:r:M���0rr:c��eZdZdd�Zy)�IncrementalDecoderc�4�t||j�dSr<)r*rr=s   rr3zIncrementalDecoder.decodeRr?rNr@)r5r6r7r3r8rrrCrCQrArrCc��eZdZeZy)�StreamWriterN�r5r6r7�bytes�charbuffertyper8rrrFrFU����NrrFc��eZdZeZy)�StreamReaderNrGr8rrrLrLXrJrrLc
�l�tjdtttt
ttd��S)N�uuF)�namer
r3�incrementalencoder�incrementaldecoder�streamreader�streamwriter�_is_text_encoding)�codecs�	CodecInforr*r:rCrLrFr8rr�getregentryrW]s-�����
���-�-�!�!��	�	r)rz<data>i�r4)
�__doc__rUr�iorrr*r,r:rCrFrLrWr8rr�<module>rZs�������,�*,�B(�F�L�L�(�0��2�2�0�0��2�2�0��5�&�-�-���5�&�-�-��

r

?>