ó r®¸Qc@sÆdZddlZddlZdd„Zdd„Zdejfd„ƒYZdejfd „ƒYZd ejfd „ƒYZd eejfd „ƒYZdeej fd„ƒYZ d„Z dS(s Python 'hex_codec' Codec - 2-digit hex content transfer encoding Unlike most of the other codecs which target Unicode, this codec will return Python string objects for both encode and decode. Written by Marc-Andre Lemburg (mal@lemburg.com). iÿÿÿÿNtstrictcCstj|ƒ}|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. (tbinasciitb2a_hextlen(tinputterrorstoutput((s)/sys/lib/python2.7/encodings/hex_codec.pyt hex_encode s cCstj|ƒ}|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. (Rta2b_hexR(RRR((s)/sys/lib/python2.7/encodings/hex_codec.pyt hex_decodestCodeccBs eZdd„Zdd„ZRS(RcCs t||ƒS(N(R(tselfRR((s)/sys/lib/python2.7/encodings/hex_codec.pytencode/scCs t||ƒS(N(R (R RR((s)/sys/lib/python2.7/encodings/hex_codec.pytdecode1s(t__name__t __module__R R (((s)/sys/lib/python2.7/encodings/hex_codec.pyR -s tIncrementalEncodercBseZed„ZRS(cCs tj|ƒS(N(RR(R Rtfinal((s)/sys/lib/python2.7/encodings/hex_codec.pyR 5s(RRtFalseR (((s)/sys/lib/python2.7/encodings/hex_codec.pyR4stIncrementalDecodercBseZed„ZRS(cCs tj|ƒS(N(RR(R RR((s)/sys/lib/python2.7/encodings/hex_codec.pyR :s(RRRR (((s)/sys/lib/python2.7/encodings/hex_codec.pyR9st StreamWritercBseZRS((RR(((s)/sys/lib/python2.7/encodings/hex_codec.pyR>st StreamReadercBseZRS((RR(((s)/sys/lib/python2.7/encodings/hex_codec.pyRAscCs4tjdddtdtdtdtdtdtƒS( NtnamethexR R tincrementalencodertincrementaldecodert streamwritert streamreader(tcodecst CodecInfoRR RRRR(((s)/sys/lib/python2.7/encodings/hex_codec.pyt getregentryFs ( t__doc__RRRR R RRRRR(((s)/sys/lib/python2.7/encodings/hex_codec.pyts