AlkantarClanX12
Current Path : /opt/alt/python312/lib64/python3.12/encodings/__pycache__/ |
Current File : //opt/alt/python312/lib64/python3.12/encodings/__pycache__/uu_codec.cpython-312.opt-1.pyc |
� �Q�f# � � � d Z ddlZddlZddlmZ dd�Zdd�Z G d� dej � Z G d� d ej � Z G d � dej � Z G d� d eej � Z G d� deej � Zd� Zy)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)�BytesIOc � � t | � }t � }|j }|j }|j dd� }|j dd� } |d|dz |fz j d� � |d� }|r& |t j |� � |d� }|r�& |d � |j � 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/python312/lib64/python3.12/encodings/uu_codec.py� uu_encoder s� � � �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 �� � t | � }t � }|j }|j } |� }|st d� �|d d dk( rn� |� }|r|dk( rn t j |� } ||� �.|st d � �|j � t | � fS # t j $ r6}|d dz dz dz dz d z } t j |d | � }Y d }~�ud }~ww xY w)Nz"Missing "begin" line in input data� s begins 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) % s � � �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$ �$C-�7,C(�(C-c � � e Zd Zdd�Zdd�Zy)�Codecc � � t ||� S �N)r ��selfr r s r r zCodec.encodeG � � ����'�'r c � � t ||� S r- )r) r. s r �decodezCodec.decodeJ r0 r N��strict)�__name__� __module__�__qualname__r r2 � r r r+ r+ F s � �(�(r r+ c � � e Zd Zdd�Zy)�IncrementalEncoderc �4 � t || j � d S �Nr )r r �r/ r �finals r r zIncrementalEncoder.encodeN � � ������,�Q�/�/r N�F)r5 r6 r7 r r8 r r r: r: M � � �0r r: c � � e Zd Zdd�Zy)�IncrementalDecoderc �4 � t || j � d S r<