B >ި@sdZddlZddlZdddZdddZGdd d ejZGd d d ejZGd d d ejZGdddeejZGdddeej Z ddZ dS)zPython '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). NstrictcCst|t|fS)N)binasciib2a_hexlen)inputerrorsr6/opt/alt/python37/lib/python3.7/encodings/hex_codec.py hex_encode sr cCst|t|fS)N)ra2b_hexr)rrrrr hex_decodesr c@s eZdZdddZdddZdS) CodecrcCs t||S)N)r )selfrrrrr encodesz Codec.encodecCs t||S)N)r )rrrrrr decodesz Codec.decodeN)r)r)__name__ __module__ __qualname__rrrrrr r s r c@seZdZdddZdS)IncrementalEncoderFcCs t|S)N)rr)rrfinalrrr rszIncrementalEncoder.encodeN)F)rrrrrrrr rsrc@seZdZdddZdS)IncrementalDecoderFcCs t|S)N)rr )rrrrrr r!szIncrementalDecoder.decodeN)F)rrrrrrrr r src@seZdZeZdS) StreamWriterN)rrrbytescharbuffertyperrrr r%src@seZdZeZdS) StreamReaderN)rrrrrrrrr r(src CstjdttttttddS)NhexF)namerrincrementalencoderincrementaldecoder streamwriter streamreader_is_text_encoding)codecs CodecInfor r rrrrrrrr getregentry-sr$)r)r) __doc__r"rr r r rrrrr$rrrr s