Viewing File: /opt/alt/python35/lib64/python3.5/encodings/__pycache__/hex_codec.cpython-35.pyc



¯ÕYfäã@sÏdZddlZddlZddd„Zddd„ZGdd	„d	ejƒZGd
d„dejƒ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/python35/lib64/python3.5/encodings/hex_codec.pyÚ
hex_encode
srcCs+|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Ú	CodecInforr
rrrrr	r	r	r
Úgetregentry-s	r%)Ú__doc__r#rrr
rrrrrr%r	r	r	r
Ú<module>s
Back to Directory File Manager