509318396
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
3

  \¡
  ã               @   sž   d Z ddlZddlZddlmZ ddd„Zdd	d
„ZG dd„ dejƒZG dd„ dejƒZG dd„ dej	ƒZ	G dd„ deej
ƒZ
G dd„ deejƒZdd„ ZdS )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€   |dkst ‚t| ƒ}tƒ }|j}|j}|d|d@ |f jdƒƒ |dƒ}x|rf|tj|ƒƒ |dƒ}qJW |dƒ |jƒ t| ƒfS )Nr   zbegin %o %s
iÿ  Úasciié-   s    
end
)	ÚAssertionErrorr   ÚreadÚwriteÚencodeÚbinasciiZb2a_uuÚgetvalueÚlen)	ÚinputÚerrorsÚfilenameÚmodeÚinfileÚoutfiler	   r
   Úchunk© r   ú*/usr/lib64/python3.6/encodings/uu_codec.pyÚ	uu_encode   s    r   c       
      C   sò   |dkst ‚t| ƒ}tƒ }|j}|j}x(|ƒ }|s:tdƒ‚|d d… dkr(P q(W x„|ƒ }| sf|dkrhP ytj|ƒ}W nR tjk
rÈ } z4|d d d@ d	 d d
 }	tj|d |	… ƒ}W Y d d }~X nX ||ƒ qRW |sâtdƒ‚|jƒ t	| ƒfS )Nr   z"Missing "begin" line in input dataé   s   begins   end
r   é    é?   é   é   zTruncated input data)
r   r   Úreadliner
   Ú
ValueErrorr   Za2b_uuÚErrorr   r   )
r   r   r   r   r   r
   ÚsÚdataÚvÚnbytesr   r   r   Ú	uu_decode!   s0    $r%   c               @   s    e Zd Zddd„Zddd„ZdS )	ÚCodecr   c             C   s
   t ||ƒS )N)r   )Úselfr   r   r   r   r   r   C   s    zCodec.encodec             C   s
   t ||ƒS )N)r%   )r'   r   r   r   r   r   ÚdecodeF   s    zCodec.decodeN)r   )r   )Ú__name__Ú
__module__Ú__qualname__r   r(   r   r   r   r   r&   B   s   
r&   c               @   s   e Zd Zddd„ZdS )ÚIncrementalEncoderFc             C   s   t || jƒd S )Nr   )r   r   )r'   r   Úfinalr   r   r   r   J   s    zIncrementalEncoder.encodeN)F)r)   r*   r+   r   r   r   r   r   r,   I   s   r,   c               @   s   e Zd Zddd„ZdS )ÚIncrementalDecoderFc             C   s   t || jƒd S )Nr   )r%   r   )r'   r   r-   r   r   r   r(   N   s    zIncrementalDecoder.decodeN)F)r)   r*   r+   r(   r   r   r   r   r.   M   s   r.   c               @   s   e Zd ZeZdS )ÚStreamWriterN)r)   r*   r+   ÚbytesÚcharbuffertyper   r   r   r   r/   Q   s   r/   c               @   s   e Zd ZeZdS )ÚStreamReaderN)r)   r*   r+   r0   r1   r   r   r   r   r2   T   s   r2   c            
   C   s   t jdttttttdd�S )NÚuuF)Únamer   r(   ÚincrementalencoderÚincrementaldecoderÚstreamreaderÚstreamwriterÚ_is_text_encoding)ÚcodecsÚ	CodecInfor   r%   r,   r.   r2   r/   r   r   r   r   ÚgetregentryY   s    r<   )r   r   r   )r   )Ú__doc__r:   r   Úior   r   r%   r&   r,   r.   r/   r2   r<   r   r   r   r   Ú<module>   s   

!