Your IP : 3.129.211.190


Current Path : /opt/alt/python311/lib64/python3.11/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/__pycache__/_compression.cpython-311.opt-2.pyc

�

c��f1��r�	ddlZddlZejZGd�dej��ZGd�dej��ZdS)�Nc�(�eZdZ	d�Zd�Zd�Zd�ZdS)�
BaseStreamc�2�|jrtd���dS)NzI/O operation on closed file)�closed�
ValueError��selfs �3/opt/alt/python311/lib64/python3.11/_compression.py�_check_not_closedzBaseStream._check_not_closeds%���;�	=��;�<�<�<�	=�	=�c�V�|���stjd���dS)NzFile not open for reading)�readable�io�UnsupportedOperationrs r
�_check_can_readzBaseStream._check_can_read�1���}�}���	G��)�*E�F�F�F�	G�	Grc�V�|���stjd���dS)NzFile not open for writing)�writablerrrs r
�_check_can_writezBaseStream._check_can_writerrc��|���stjd���|���stjd���dS)Nz3Seeking is only supported on files open for readingz3The underlying file object does not support seeking)rrr�seekablers r
�_check_can_seekzBaseStream._check_can_seeksl���}�}���	G��)�+F�G�G�
G��}�}���	F��)�+E�F�F�
F�	F�	FrN)�__name__�
__module__�__qualname__rrrr�rr
rr	s^������)�=�=�=�G�G�G�G�G�G�F�F�F�F�Frrc�h��eZdZ	d�Zd
d�Z�fd�Zd�Zd�Zdd�Zd	�Z	d
�Z
ejfd�Z
d�Z�xZS)�DecompressReaderc��dS)NTrrs r
rzDecompressReader.readable$s���trrc��||_d|_d|_d|_||_||_|jdi|j��|_||_dS)NFr���r)�_fp�_eof�_pos�_size�_decomp_factory�_decomp_args�
_decompressor�_trailing_error)r	�fp�decomp_factory�trailing_error�decomp_argss     r
�__init__zDecompressReader.__init__'s`�������	���	���
� .���'���1�T�1�F�F�D�4E�F�F��� .����rc�R��d|_t�����S�N)r(�super�close)r	�	__class__s �r
r2zDecompressReader.close;s���!����w�w�}�}���rc�4�|j���Sr0)r"rrs r
rzDecompressReader.seekable?s���x� � �"�"�"rc�4�t|��5}|�d��5}|�t|����}||dt|���<ddd��n#1swxYwYddd��n#1swxYwYt|��S)N�B)�
memoryview�cast�read�len)r	�b�view�	byte_view�datas     r
�readintozDecompressReader.readintoBs���
��]�]�	)�d�D�I�I�c�N�N�	)�i��9�9�S��^�^�,�,�D�$(�I�j�s�4�y�y�j�!�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)����	)�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)����	)�	)�	)�	)��4�y�y�s4�B�7A)�B�)A-	�-B�0A-	�1B�B�Br!c�v�|dkr|���S|r|jrdSd}	|jjrr|jjp|j�t��}|sn�|jdi|j	��|_	|j�
||��}nj#|j$rYnbwxYw|jjr1|j�t��}|std���nd}|j�
||��}|rn��|sd|_|j|_dS|xjt!|��z
c_|S)NrrTzACompressed file ended before the end-of-stream marker was reachedr)�readallr#r(�eof�unused_datar"r9�BUFFER_SIZEr&r'�
decompressr)�needs_input�EOFErrorr$r%r:)r	�sizer>�rawblocks    r
r9zDecompressReader.readHs����!�8�8��<�<�>�>�!��	�t�y�	��3���	��!�%�
E� �.�:�7� �H�M�M�+�6�6�����%9�T�%9�&)�&)��'�&)�&)��"���-�8�8��4�H�H�D�D���+�����E������%�1�#�#�x�}�}�[�9�9�H�#�K�&�(J�K�K�K�K� #�H��)�4�4�X�t�D�D���
��1	�2�	��D�I���D�J��3��	�	�S��Y�Y��	�	��s�;B�
B$�#B$c���g}|�tj��x}r6|�|��|�tj��x}�6d�|��S)Nr)r9�sys�maxsize�append�join)r	�chunksr>s   r
rAzDecompressReader.readallqsg�����i�i���,�,�,�d�	 ��M�M�$�����i�i���,�,�,�d�	 ��x�x����rc��|j�d��d|_d|_|jdi|j��|_dS)NrFr)r"�seekr#r$r&r'r(rs r
�_rewindzDecompressReader._rewind|sH����
�
�a������	���	�1�T�1�F�F�D�4E�F�F����rc�f�|tjkrn�|tjkr|j|z}n�|tjkrU|jdkr?|�tj��r 	|�tj��� |j|z}n"td�	|�����||jkr|�
��n
||jz}|dkrH|�ttj|����}|sn|t|��z}|dk�H|jS)NrzInvalid value for whence: {})
r�SEEK_SET�SEEK_CURr$�SEEK_ENDr%r9�DEFAULT_BUFFER_SIZEr�formatrR�minr:)r	�offset�whencer>s    r
rQzDecompressReader.seek�s&���R�[� � ��
�r�{�
"�
"��Y��'�F�F�
�r�{�
"�
"��z�A�~�~��i�i�� 6�7�7����i�i�� 6�7�7���Z�&�(�F�F��;�B�B�6�J�J�K�K�K��D�I����L�L�N�N�N�N��d�i��F��q�j�j��9�9�S��!7��@�@�A�A�D��
���c�$�i�i��F�	�q�j�j��y�rc��	|jSr0)r$rs r
�tellzDecompressReader.tell�s
��/��y�r)r)r!)rrrrr.r2rr?r9rArRrrTrQr]�
__classcell__)r3s@r
rr!s��������?����.�.�.�.�(�����#�#�#����'�'�'�'�R � � �G�G�G�#%�+�����<������rr)rrKrWrD�BufferedIOBaser�	RawIOBaserrrr
�<module>ras���=�	�	�	�	�
�
�
�
��$��F�F�F�F�F��"�F�F�F�0A�A�A�A�A�r�|�A�A�A�A�Ar

?>