î ±+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ÚstrictcCs+|dkst‚tj|ƒt|ƒfS)Nr)ÚAssertionErrorÚbinasciiÚb2a_hexÚlen)ÚinputÚerrors©r ú8/opt/alt/python34/lib64/python3.4/encodings/hex_codec.pyÚ hex_encode sr cCs+|dkst‚tj|ƒt|ƒfS)Nr)rrÚa2b_hexr)rrr r r Ú hex_decodesr c@s.eZdZddd„Zddd„ZdS)ÚCodecrcCs t||ƒS)N)r )Úselfrrr r r Úencodesz Codec.encodecCs t||ƒS)N)r )rrrr r r Údecodesz Codec.decodeN)Ú__name__Ú __module__Ú __qualname__rrr r r r rs rc@seZdZddd„ZdS)ÚIncrementalEncoderFcCs"|jdkst‚tj|ƒS)Nr)rrrr)rrÚfinalr r r rszIncrementalEncoder.encodeN)rrrrr r r r rs rc@seZdZddd„ZdS)ÚIncrementalDecoderFcCs"|jdkst‚tj|ƒS)Nr)rrrr )rrrr r r r!szIncrementalDecoder.decodeN)rrrrr r r r r s rc@seZdZeZdS)Ú StreamWriterN)rrrÚbytesÚcharbuffertyper r r r r%s rc@seZdZeZdS)Ú StreamReaderN)rrrrrr r r r r(s rcCs:tjdddtdtdtdtdtdtd d ƒS) NÚnameÚhexrrÚincrementalencoderÚincrementaldecoderÚ streamwriterÚ streamreaderÚ_is_text_encodingF)ÚcodecsÚ CodecInfor r rrrrr r r r Ú getregentry-s r%) Ú__doc__r#rr r rrrrrr%r r r r Ús