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

  \É  ã               @   s’   d Z ddlZddl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 'bz2_codec' Codec - bz2 compression encoding.

This codec de/encodes from bytes to bytes and is therefore usable with
bytes.transform() and bytes.untransform().

Adapted by Raymond Hettinger from zlib_codec.py which was written
by Marc-Andre Lemburg (mal@lemburg.com).
é    NÚstrictc             C   s   t j| ƒt| ƒfS )N)Úbz2ÚcompressÚlen)ÚinputÚerrors© r   ú+/usr/lib64/python3.6/encodings/bz2_codec.pyÚ
bz2_encode   s    r
   c             C   s   t j| ƒt| ƒfS )N)r   Ú
decompressr   )r   r   r   r   r	   Ú
bz2_decode   s    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	   Úencode   s    zCodec.encodec             C   s
   t ||ƒS )N)r   )r   r   r   r   r   r	   Údecode   s    zCodec.decodeN)r   )r   )Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r	   r      s   
r   c               @   s(   e Zd Zd
dd„Zddd„Zdd„ Zd	S )ÚIncrementalEncoderr   c             C   s   || _ tjƒ | _d S )N)r   r   ÚBZ2CompressorÚcompressobj)r   r   r   r   r	   Ú__init__   s    zIncrementalEncoder.__init__Fc             C   s.   |r| j j|ƒ}|| j jƒ  S | j j|ƒS d S )N)r   r   Úflush)r   r   ÚfinalÚcr   r   r	   r   #   s    zIncrementalEncoder.encodec             C   s   t jƒ | _d S )N)r   r   r   )r   r   r   r	   Úreset*   s    zIncrementalEncoder.resetN)r   )F)r   r   r   r   r   r   r   r   r   r	   r      s   

r   c               @   s(   e Zd Zd
dd„Zddd„Zdd„ Zd	S )ÚIncrementalDecoderr   c             C   s   || _ tjƒ | _d S )N)r   r   ÚBZ2DecompressorÚdecompressobj)r   r   r   r   r	   r   .   s    zIncrementalDecoder.__init__Fc             C   s&   y| j j|ƒS  tk
r    dS X d S )NÚ )r   r   ÚEOFError)r   r   r   r   r   r	   r   3   s    zIncrementalDecoder.decodec             C   s   t jƒ | _d S )N)r   r   r   )r   r   r   r	   r   9   s    zIncrementalDecoder.resetN)r   )F)r   r   r   r   r   r   r   r   r   r	   r   -   s   

r   c               @   s   e Zd ZeZdS )ÚStreamWriterN)r   r   r   ÚbytesÚcharbuffertyper   r   r   r	   r!   <   s   r!   c               @   s   e Zd ZeZdS )ÚStreamReaderN)r   r   r   r"   r#   r   r   r   r	   r$   ?   s   r$   c            
   C   s   t jdttttttdd�S )Nr   F)Únamer   r   ÚincrementalencoderÚincrementaldecoderÚstreamwriterÚstreamreaderÚ_is_text_encoding)ÚcodecsÚ	CodecInfor
   r   r   r   r!   r$   r   r   r   r	   ÚgetregentryD   s    r-   )r   )r   )Ú__doc__r+   r   r
   r   r   r   r   r!   r$   r-   r   r   r   r	   Ú<module>   s   

