a
´iÉ ã @ sŽ d dl Z d dlZddd„Zddd„ZG dd„ de jƒZG d d
„ d
e jƒZG dd„ de jƒZG d
d„ dee jƒZG dd„ dee jƒZdd„ Z dS )é NÚstrictc C s t | ¡t| ƒfS ©N)Úbz2ÚcompressÚlen©ÚinputÚerrors© r
ú+/usr/lib64/python3.9/encodings/bz2_codec.pyÚ
bz2_encode s r c C s t | ¡t| ƒfS r )r Ú
decompressr r r
r
r Ú
bz2_decode s r c @ s e Zd Zddd„Zddd„ZdS ) ÚCodecr c C s
t ||ƒS r )r ©Úselfr r r
r
r Úencode s zCodec.encodec C s
t ||ƒS r )r r r
r
r Údecode s zCodec.decodeN)r )r )Ú__name__Ú
__module__Ú__qualname__r r r
r
r
r r s
r c @ s( e Zd Zd
dd„Zddd„Zdd„ Zd S )ÚIncrementalEncoderr c C s || _ t ¡ | _d S r )r r Ú
BZ2CompressorÚcompressobj©r r r
r
r Ú__init__ s zIncrementalEncoder.__init__Fc C s. |r| j |¡}|| j ¡ S | j |¡S d S r )r r Úflush)r r ÚfinalÚcr
r
r r # s zIncrementalEncoder.encodec C s t ¡ | _d S r )r r r ©r r
r
r Úreset* s zIncrementalEncoder.resetN)r )F)r r r r r r r
r
r
r r s
r c @ s( e Zd Zd
dd„Zddd„Zdd„ Zd S )ÚIncrementalDecoderr c C s || _ t ¡ | _d S r )r r ÚBZ2DecompressorÚ
decompressobjr r
r
r r . s zIncrementalDecoder.__init__Fc C s( z| j |¡W S ty" Y dS 0 d S )NÚ )r# r
ÚEOFError)r r r r
r
r r 3 s zIncrementalDecoder.decodec C s t ¡ | _d S r )r r" r# r r
r
r r 9 s zIncrementalDecoder.resetN)r )F)r r r r r r r
r
r
r r! - s
r! c @ s e Zd ZeZdS )ÚStreamWriterN©r r r ÚbytesÚcharbuffertyper
r
r
r r&