î ±+eäã@sÏdZddlZddlZddd„Zddd„ZGdd „d ejƒZGd d „d ejƒZGd d „d ejƒZGdd„deejƒZGdd„deej ƒZ dd„Z dS)z Python 'hex_codec' Codec - 2-digit hex content transfer encoding. This codec de/encodes from bytes to bytes. Written by Marc-Andre Lemburg (mal@lemburg.com). éNÚstrictcCstj|ƒt|ƒfS)N)ÚbinasciiÚb2a_hexÚlen)ÚinputÚerrors©rú8/opt/alt/python34/lib64/python3.4/encodings/hex_codec.pyÚ hex_encode sr cCstj|ƒt|ƒfS)N)rÚa2b_hexr)rrrrr Ú hex_decodesr c@s.eZdZddd„Zddd„ZdS)ÚCodecrcCs t||ƒS)N)r )Úselfrrrrr Úencodesz Codec.encodecCs t||ƒS)N)r )rrrrrr Údecodesz Codec.decodeN)Ú__name__Ú __module__Ú __qualname__rrrrrr r s r c@seZdZddd„ZdS)ÚIncrementalEncoderFcCs tj|ƒS)N)rr)rrÚfinalrrr rszIncrementalEncoder.encodeN)rrrrrrrr rs rc@seZdZddd„ZdS)ÚIncrementalDecoderFcCs tj|ƒS)N)rr )rrrrrr r!szIncrementalDecoder.decodeN)rrrrrrrr r s rc@seZdZeZdS)Ú StreamWriterN)rrrÚbytesÚcharbuffertyperrrr r%s rc@seZdZeZdS)Ú StreamReaderN)rrrrrrrrr r(s rcCs:tjdddtdtdtdtdtdtd d ƒS) NÚnameÚhexrrÚincrementalencoderÚincrementaldecoderÚ streamwriterÚ streamreaderÚ_is_text_encodingF)ÚcodecsÚ CodecInfor r rrrrrrrr Ú getregentry-s r$) Ú__doc__r"rr r r rrrrr$rrrr Ús