관리-도구
편집 파일: uu_codec.cpython-38.opt-1.pyc
U e5d# � @ s� d Z ddlZddlZddlmZ ddd�Zdd d �ZG dd� dej�ZG d d� dej�ZG dd� dej �Z G dd� deej �Z G dd� deej�Zdd� 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 C s� t | �}t � }|j}|j}|�dd�}|�dd�}|d|d@ |f �d�� |d�}|rp|t�|�� |d�}qT|d � |�� t| �fS ) N� z\n� z\rzbegin %o %s i� �ascii�- s end ) r �read�write�replace�encode�binasciiZb2a_uu�getvalue�len) �input�errors�filename�mode�infile�outfiler r �chunk� r �*/usr/lib64/python3.8/encodings/uu_codec.py� uu_encode s r c C s� t | �}t � }|j}|j}|� }|s,td��|d d� dkrq@q|� }|r�|dkrTq�zt�|�}W nR tjk r� } z2|d d d@ d d d } t�|d | � �}W 5 d }~X Y nX ||� q@|s�td ��|�� t| �fS )Nz"Missing "begin" line in input data� s begins end r � �? � � zTruncated input data) r �readliner � ValueErrorr Za2b_uu�Errorr r ) r r r r r r �s�data�v�nbytesr r r � uu_decode% s* $ r'