Hacked By AnonymousFox
�
c��f# � � � d Z ddlZddlZddlmZ dd�Zdd�Z G d � d
ej � � Z G d� dej � � Z G d
� dej � � Z G d� deej
� � Z
G d� deej � � Zd� ZdS )a Python '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 �� � t | � � }t � � }|j }|j }|� dd� � }|� dd� � } |d|dz |fz � d� � � � |d� � }|r* |t j |� � � � |d� � }|�* |d � � |� � � t | � � fS )
N�
z\n�
z\rzbegin %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/python311/lib64/python3.11/encodings/uu_codec.py� uu_encoder s� � �
�U�^�^�F��i�i�G��;�D��M�E� ����U�+�+�H�����U�+�+�H�
�E�?�d�U�l�H�5�5�
=�
=�g�
F�
F�G�G�G��D��H�H�E�
� �
��h�o�e�$�$�%�%�%���R���� � �
�E�+����������E�
�
�+�+� c �" � t | � � }t � � }|j }|j } |� � }|st d� � �|d d� dk rn�+ |� � }|r|dk rnq t j |� � }nO# t j $ r=}|d dz
d z d
z dz dz } t j |d | � � � }Y d }~nd }~ww xY w ||� � ��|st d� � �|� � � t | � � fS )
N� z"Missing "begin" line in input data� s beginTs end
r � �? � � zTruncated input data) r �readliner
�
ValueErrorr �a2b_uu�Errorr r )
r r r r r% r
�s�data�v�nbytess
r � uu_decoder- % sL � �
�U�^�^�F��i�i�G���H��M�E���H�J�J��� C��A�B�B�B��R�a�R�5�H�������H�J�J��� �A��M�M�� /��?�1�%�%�D�D���~� /� /� /��!��R��2�~��*�Q�.�1�4�F��?�1�W�f�W�:�.�.�D�D�D�D�D�D����� /����
��d�����
� 1��/�0�0�0�������E�
�
�+�+s �-B �C�3C � Cc � � e Zd Zdd�Zdd�ZdS )�Codecr c �"