³ò Ec@sÆdZddkZddkZdd„Zdd„Zdeifd„ƒYZdeifd „ƒYZd eifd „ƒYZd eeifd „ƒYZdeei fd„ƒYZ d„Z dS(s2 Python 'bz2_codec' Codec - bz2 compression encoding Unlike most of the other codecs which target Unicode, this codec will return Python string objects for both encode and decode. Adapted by Raymond Hettinger from zlib_codec.py which was written by Marc-Andre Lemburg (mal@lemburg.com). iÿÿÿÿNtstrictcCs3|djpt‚ti|ƒ}|t|ƒfS(s Encodes the object input and returns a tuple (output object, length consumed). errors defines the error handling to apply. It defaults to 'strict' handling which is the only currently supported error handling for this codec. R(tAssertionErrortbz2tcompresstlen(tinputterrorstoutput((sencodings\bz2_codec.pyct bz2_encodes cCs3|djpt‚ti|ƒ}|t|ƒfS(sË Decodes the object input and returns a tuple (output object, length consumed). input must be an object which provides the bf_getreadbuf buffer slot. Python strings, buffer objects and memory mapped files are examples of objects providing this slot. errors defines the error handling to apply. It defaults to 'strict' handling which is the only currently supported error handling for this codec. R(RRt decompressR(RRR((sencodings\bz2_codec.pyct bz2_decodestCodeccBs eZdd„Zdd„ZRS(RcCs t||ƒS(N(R(tselfRR((sencodings\bz2_codec.pyctencode1scCs t||ƒS(N(R (R RR((sencodings\bz2_codec.pyctdecode3s(t__name__t __module__R R(((sencodings\bz2_codec.pycR /s tIncrementalEncodercBs)eZdd„Zed„Zd„ZRS(RcCs0|djpt‚||_tiƒ|_dS(NR(RRRt BZ2Compressort compressobj(R R((sencodings\bz2_codec.pyct__init__7s cCsB|o'|ii|ƒ}||iiƒSn|ii|ƒSdS(N(RRtflush(R Rtfinaltc((sencodings\bz2_codec.pycR <scCstiƒ|_dS(N(RRR(R ((sencodings\bz2_codec.pyctresetCs(RRRtFalseR R(((sencodings\bz2_codec.pycR6s  tIncrementalDecodercBs)eZdd„Zed„Zd„ZRS(RcCs0|djpt‚||_tiƒ|_dS(NR(RRRtBZ2Decompressort decompressobj(R R((sencodings\bz2_codec.pycRGs cCs2y|ii|ƒSWntj o dSnXdS(Nt(RR tEOFError(R RR((sencodings\bz2_codec.pycRLscCstiƒ|_dS(N(RRR(R ((sencodings\bz2_codec.pycRRs(RRRRRR(((sencodings\bz2_codec.pycRFs  t StreamWritercBseZRS((RR(((sencodings\bz2_codec.pycRUst StreamReadercBseZRS((RR(((sencodings\bz2_codec.pycR XscCs4tidddtdtdtdtdtdtƒS( NtnameRR Rtincrementalencodertincrementaldecodert streamwritert streamreader(tcodecst CodecInfoRR RRRR (((sencodings\bz2_codec.pyct getregentry]s ( t__doc__R&RRR R RRRR R((((sencodings\bz2_codec.pycs s