← Back
Editing: decode.cpython-311.pyc
� �+�jX � � � d dl mZ d dlZ G d� de� � Z G d� de� � Z G d� de� � Z G d � d e� � Zdefd�Z G d � de� � Z dS )� )�ProtocolNc � � e Zd ZdZdS )�DecodeRatioErrorzBOutput-to-input amplification ratio exceeded the configured limit.N��__name__� __module__�__qualname__�__doc__� � �1/usr/lib/python3/dist-packages/httplib2/decode.pyr r s � � � � � �L�L�L�Lr r c � � e Zd ZdZdS )�DecodeLimitErrorz,Total output length exceeded the hard limit.Nr r r r r r s � � � � � �6�6�6�6r r c �\ � e Zd Zedefd�� � Zdedefd�Zdefd�Zddede defd �Z d S )�DecoderProtocol�returnc � � d S �Nr ��selfs r �needs_inputzDecoderProtocol.needs_input s � ��r �bc � � d S r r �r r s r �decodezDecoderProtocol.decode � � ��r c � � d S r r r s r �flushzDecoderProtocol.flush r r � �data� chunk_sizec �` � t � � }|dk rt |� � }t dt |� � |� � D ]7}||||z � }|� | � |� � � � �8|� | � � � � � t |� � S )Nr )� bytearray�len�range�extendr r �bytes)r r r! �out�i�chunks r � consume_byteszDecoderProtocol.consume_bytes s� � ��k�k����?�?��T���J��q�#�d�)�)�Z�0�0� +� +�A���Q��^�+�,�E��J�J�t�{�{�5�)�)�*�*�*�*�� � �4�:�:�<�<� � � ��S�z�z�r N)r )r r r �property�boolr r'