/usr/lib/python3/dist-packages/httplib2/__pycache__
NameSizeModeActions
auth.cpython-310.pyc21520644editdlrm
certs.cpython-310.pyc9300644editdlrm
decode.cpython-310.pyc56200644editdlrm
error.cpython-310.pyc17950644editdlrm
iri2uri.cpython-310.pyc31030644editdlrm
socks.cpython-310.pyc145230644editdlrm
__init__.cpython-310.pyc462000644editdlrm
Edit: /usr/lib/python3/dist-packages/httplib2/__pycache__/decode.cpython-310.pyc (5620B)
o 0PjX@svddlmZddlZGdddeZGdddeZGdddeZGd d d eZd efd d ZGdddeZ dS))ProtocolNc@eZdZdZdS)DecodeRatioErrorzBOutput-to-input amplification ratio exceeded the configured limit.N__name__ __module__ __qualname____doc__r r 1/usr/lib/python3/dist-packages/httplib2/decode.pyrrc@r)DecodeLimitErrorz,Total output length exceeded the hard limit.Nrr r r r r r r c@sVeZdZedefddZdedefddZdefddZdd ed e defd d Z dS)DecoderProtocolreturncCdSNr selfr r r needs_inputszDecoderProtocol.needs_inputbcCrrr rrr r r decodezDecoderProtocol.decodecCrrr rr r r flushrzDecoderProtocol.flushdata chunk_sizecCsbt}|dkr t|}tdt||D]}||||}|||q||t|S)Nr) bytearraylenrangeextendrrbytes)rrroutichunkr r r consume_bytesszDecoderProtocol.consume_bytesN)r) rrrpropertyboolrr!rrintr%r r r r r s rc@sheZdZdZdZdZdZdZdZefde fdd Z e d e fd d Z d ed efddZd efddZdS) ZlibDecodera# Thin wrapper around zlib.Decompressor conforming to the Decoder interface. Note: zlib pushes all available decompressed data immediately upon receiving input. It never holds back output requiring `decode(b"")` to extract it. Thus, `needs_input` naturally remains True. )_decoderi/wbitscCst||_dSr)zlib decompressobjr*)rr.r r r __init__3szZlibDecoder.__init__rcCs|jdur td|jj SNzused after flush())r* RuntimeErroreofrr r r r6s  zZlibDecoder.needs_inputrcCs|jdur td|j|Sr2)r*r3 decompressrr r r r<s  zZlibDecoder.decodecCs&|jdur td|j}d|_|Sr2)r*r3r)rresultr r r rAs  zZlibDecoder.flushN)rrrr __slots__ WBITS_DEFLATE WBITS_ZLIB WBITS_GZIPWBITS_AUTO_GZIP_ZLIBr(r1r&r'rr!rrr r r r r)#sr)rcCs ttjSr)r)r8r r r r DeflateDecoderIs r<c @seZdZdZ    ddededed ed ed d f d dZdddZe d e fddZ de d e fddZ d e fddZde d efddZd S) LimitDecoder) r*_ratio _chunk_size _safe_limit _hard_limit_consumed_length_output_length _input_buffer_flusheddr decoderratior safe_limit hard_limitrNcCs|dkr td|d|dkrtd|d|dkr$td|d|dkr0td|d||_||_||_||_||_d|_d|_t|_ d|_ dS)NrzLimitDecoder() ratio=z expected >= 0zLimitDecoder() chunk_size=zLimitDecoder() safe_limit=F) ValueErrorr*r>r?r@rArBrCrrDrE)rrIrJrrKrLr r r r1Zs" zLimitDecoder.__init__c Cs|jdkr|j|jkrtd|jd|j|jdkr$|j|jkr$dS|jdkrU|j|j|jkrW|jdkr=|j|jntd}td|dd|jd|jd |jdSdS) NrzOutput length z exceeds hard limit infzAmplification ratio z.1fz (/z) exceeds limit )rArCr r@r>rBfloatr)r actual_ratior r r _check_limitsuszLimitDecoder._check_limitscCs|jjSr)r*rrr r r rszLimitDecoder.needs_inputrcCs |jrtd||}t|S)Nzdecode() called after flush())rEr3_pumpr!)rroutputr r r rs zLimitDecoder.decodecCsT|jrtdd|_|d}|j}|||jt|7_|t |S)Nzflush() called more than onceT) rEr3rSr*rr rCrrRr!)rrTrr r r rs   zLimitDecoder.flushcCs|j|t} |jjs)|jd}|r)|||jt|7_|q |jrat |jd|j }|jd|j =|j|}|j t|7_ |r`|||jt|7_|q |S)NTrU) rDr rr*rrrCrrRr!r?rB)rrrTrr$r r r rSs,     zLimitDecoder._pump)rFrrGrH)rN)rrrr7rrPr(r1rRr&r'rr!rrrrSr r r r r=Ms2  r=) typingrr/ Exceptionrr rr)r<r=r r r r s &