Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
_receivebuffer.cpython-313.pyc35 linesDownload Raw Back to __pycache__
1�

2�j���|�SSKrSSKrSSKJrJrJr S/r\R"S\R5r	"SS5r3g)�N)�List�Optional�Union�
ReceiveBuffers4
?5c���\rSrSrSSjrS\\\4SS4SjrS\	4Sjr6S\4SjrS\4S	jr
S7\S\4SjrS8\S\\4SjrS\\4S
jrS\\\4SjrS\	4SjrSrg)r�/�returnNc�>�[5UlSUlSUlg�Nr)�	bytearray�_data�_next_line_search�_multiple_lines_search��selfs �XD:\code\apps\devtools\python\user_packages\Python313\site-packages\h11/_receivebuffer.py�__init__�ReceiveBuffer.__init__0s���[��9�!"���&'��#��	byteslikec�0�U=RU-
slU$�N)r
)rrs  r�__iadd__�ReceiveBuffer.__iadd__5s���10�11�i��12��rc�*�[[U55$r)�bool�lenrs r�__bool__�ReceiveBuffer.__bool__9s���C��I��rc�,�[UR5$r)rr
rs r�__len__�ReceiveBuffer.__len__<s���4�:�:��rc�,�[UR5$r)�bytesr
rs r�	__bytes__�ReceiveBuffer.__bytes__@s���T�Z�Z� � r�countc�^�URSUnURSU2	SUlSUlU$r)r
rr�rr'�outs   r�_extract�ReceiveBuffer._extractCs7���j�j��%� ���J�J�v��v��!"���&'��#��13rc�R�URSUnU(dgURU5$)z214Extract a fixed number of bytes from the buffer.15N)r
r+r)s   r�maybe_extract_at_most�#ReceiveBuffer.maybe_extract_at_mostMs)���j�j��%� �����}�}�U�#�#rc���[SURS-165nURRSU5nUS:Xa[	UR5UlgUS-nURU5$)z;17Extract the first line, if it is completed in the buffer.18r��
19�����N�)�maxrr
�findrr+)r�search_start_index�partial_idx�idxs    r�maybe_extract_next_line�%ReceiveBuffer.maybe_extract_next_lineWsf��20!��D�$:�$:�Q�$>�?���j�j�o�o�g�/A�B���"��%(����_�D�"���A�o���}�}�S�!�!rc�6�URSSS:XaURS5 /$URSSS:XaURS5 /$[RURUR5nUc([S[
UR5S-215UlgURS5SnURU5nURS5nUHnURS5(dMUS	M  US	USs=:XaS22:Xde eUS	S2	U$)zL23Extract everything up to the first blank line, and return a list of lines.24Nr1�25r4r2rr3�
�����r)26r
r+�blank_line_regex�searchrr5r�span�split�endswith)r�matchr9r*�lines�lines      r�maybe_extract_lines�!ReceiveBuffer.maybe_extract_lineshs
��27�:�:�b�q�>�U�"��M�M�!���I��:�:�b�q�>�W�$��M�M�!���I�!�'�'��28�29�D�4O�4O�P���=�*-�a��T�Z�Z��1�1D�*E�D�'���j�j��m�B����m�m�C� ���	�	�%� ���D��}�}�U�#�#���H���R�y�E�"�I�,��,�,�,�,�,��"�#�J��rc�H�URSS:$![a gf=f)Nr�!F)r
�30IndexErrorrs r�+is_next_line_obviously_invalid_request_line�9ReceiveBuffer.is_next_line_obviously_invalid_request_line�s.��	��:�:�a�=�4�'�'���	��	�s��31!�!)r
rr)r	N)�__name__�32__module__�__qualname__�__firstlineno__rrr$rrrr�intr!r%r+rr.r:rrHrM�__static_attributes__�rrrr/s���(�33�%��y�(8�"9��o���$�����!�5�!��c��i��$�3�$�8�I�3F�$�"��)�)<�"�" �X�d�9�o�%>� �V�T�r)�re�sys�typingrrr�__all__�compile�	MULTILINEr@rrUrr�<module>r\s=��	�34�(�(��35��N�:�:�j�"�,�,�7��j�jr
codekingpro/portable-devtools · Team Ai