U e5d%@spddlZdddZdddZGdddejZGd d d ejZGd d d ejZGd ddejZddZdS)NstrictcCstjt||dt|fSNr)codecsBOM_UTF8 utf_8_encodelen)inputerrorsr +/usr/lib64/python3.8/encodings/utf_8_sig.pyencodesr cCsDd}|ddtjkr&|dd}d}t||d\}}|||fS)NrT)rr utf_8_decode)rr prefixoutputconsumedr r r decodes  rc@s8eZdZdddZdddZddZd d Zd d Zd S)IncrementalEncoderrcCstj||d|_dSN)rr__init__firstselfr r r r rszIncrementalEncoder.__init__FcCs:|jr$d|_tjt||jdSt||jdSdSr)rrrrr )rrfinalr r r r s zIncrementalEncoder.encodecCstj|d|_dSr)rrresetrrr r r r's zIncrementalEncoder.resetcCs|jSNrrr r r getstate+szIncrementalEncoder.getstatecCs ||_dSrrrstater r r setstate.szIncrementalEncoder.setstateN)r)F)__name__ __module__ __qualname__rr rrr"r r r r rs   rc@s6eZdZd ddZddZddZdd Zd d Zd S)IncrementalDecoderrcCstj||d|_dSr)rBufferedIncrementalDecoderrrrr r r r2szIncrementalDecoder.__init__cCsv|jrht|dkr*tj|r"dSd|_n>d|_|ddtjkrht|dd||\}}||dfSt|||S)Nr rr)rrrr startswithr)rrr rrrr r r _buffer_decode6s   z!IncrementalDecoder._buffer_decodecCstj|d|_dSr)rr'rrrr r r rGs zIncrementalDecoder.resetcCstj|}|d|jfSr)rr'rrr r r r rKs zIncrementalDecoder.getstatecCstj|||d|_dSr)rr'r"rr r r r r"PszIncrementalDecoder.setstateN)r)r#r$r%rr+rrr"r r r r r&1s  r&c@seZdZddZdddZdS) StreamWritercCs.tj|z|`Wntk r(YnXdSr)rr,rr AttributeErrorrr r r rVs  zStreamWriter.resetrcCstj|_t||Sr)rrr )rrr r r r r ]szStreamWriter.encodeN)r)r#r$r%rr r r r r r,Usr,c@seZdZddZdddZdS) StreamReadercCs.tj|z|`Wntk r(YnXdSr)rr.rrr-rr r r rbs  zStreamReader.resetrcCspt|dkrtj|r\dSn>|ddtjkr\tj|_t|dd|\}}||dfStj|_t||S)Nr r()rrrr*rr)rrr rrr r r ris   zStreamReader.decodeN)r)r#r$r%rrr r r r r.asr.c CstjdttttttdS)Nz utf-8-sig)namer rincrementalencoderincrementaldecoder streamreader streamwriter)r CodecInfor rrr&r.r,r r r r getregentryysr5)r)r) rr rrr'r&r,r.r5r r r r  s  $