3 \Éã@sŽddlZddlZddd„Zddd„ZGdd„dejƒZGd d „d ejƒZGd d „d ejƒZGd d„deejƒZGdd„deejƒZdd„Z dS)éNÚstrictcCstj|ƒt|ƒfS)N)Úbz2ÚcompressÚlen)ÚinputÚerrors©rú+/usr/lib64/python3.6/encodings/bz2_codec.pyÚ bz2_encodesr cCstj|ƒt|ƒfS)N)rÚ decompressr)rrrrr Ú bz2_decodesr c@s eZdZddd„Zddd„ZdS) ÚCodecrcCs t||ƒS)N)r )Úselfrrrrr Úencodesz Codec.encodecCs t||ƒS)N)r )rrrrrr Údecodesz Codec.decodeN)r)r)Ú__name__Ú __module__Ú __qualname__rrrrrr r s r c@s(eZdZd dd„Zd dd„Zdd„Zd S) ÚIncrementalEncoderrcCs||_tjƒ|_dS)N)rrÚ BZ2CompressorÚ compressobj)rrrrr Ú__init__szIncrementalEncoder.__init__FcCs.|r|jj|ƒ}||jjƒS|jj|ƒSdS)N)rrÚflush)rrÚfinalÚcrrr r#s zIncrementalEncoder.encodecCstjƒ|_dS)N)rrr)rrrr Úreset*szIncrementalEncoder.resetN)r)F)rrrrrrrrrr rs  rc@s(eZdZd dd„Zd dd„Zdd„Zd S) ÚIncrementalDecoderrcCs||_tjƒ|_dS)N)rrÚBZ2DecompressorÚ decompressobj)rrrrr r.szIncrementalDecoder.__init__Fc Cs&y |jj|ƒStk r dSXdS)NÚ)rr ÚEOFError)rrrrrr r3s zIncrementalDecoder.decodecCstjƒ|_dS)N)rrr)rrrr r9szIncrementalDecoder.resetN)r)F)rrrrrrrrrr r-s  rc@seZdZeZdS)Ú StreamWriterN)rrrÚbytesÚcharbuffertyperrrr r!<sr!c@seZdZeZdS)Ú StreamReaderN)rrrr"r#rrrr r$?sr$c Cstjdttttttdd�S)NrF)ÚnamerrÚincrementalencoderÚincrementaldecoderÚ streamwriterÚ streamreaderÚ_is_text_encoding)ÚcodecsÚ CodecInfor r rrr!r$rrrr Ú getregentryDsr-)r)r) r+rr r r rrr!r$r-rrrr Ú s