AlkantarClanX12

Your IP : 3.147.86.246


Current Path : /opt/alt/python312/lib64/python3.12/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/__pycache__/bz2.cpython-312.opt-2.pyc

�

�Q�fG.���	gd�ZdZddlmZddlZddlZddlZddlm	Z	m
Z
dZdZdZ
Gd�d	ej�Z		d
d
�Zdd�Zd�Zy))�BZ2File�
BZ2Compressor�BZ2Decompressor�open�compress�
decompressz%Nadeem Vawda <nadeem.vawda@gmail.com>�)rN)rr��c��eZdZ	ddd�d�Zd�Zed��Zd�Zd�Zd�Z	d	�Z
dd
�Zdd�Zdd�Z
d
�Zdd�Zdd�Zd�Zd�Zej(fd�Zd�Zy)r�	��
compresslevelc��	d|_d|_t|_d|cxkrdkst	d��t	d��|dvr	d}t
}ne|dvrd}t}t|�|_nH|d	vrd
}t}t|�|_n+|dvrd}t}t|�|_nt	d
|����t|tttjf�r t||�|_d|_||_n2t|d�st|d�r||_||_nt!d��|jt
k(rEt#j$|jt&t(��}t+j,|�|_yd|_y)NFr	rz%compresslevel must be between 1 and 9)��r�rbr)�w�wbr)�x�xbr)�a�abr�Invalid mode: T�read�writez6filename must be a str, bytes, file or PathLike object)�trailing_errorr)�_fp�_closefp�_MODE_CLOSED�_mode�
ValueError�
_MODE_READ�_MODE_WRITEr�_compressor�
isinstance�str�bytes�os�PathLike�
_builtin_open�hasattr�	TypeError�_compression�DecompressReaderr�OSError�io�BufferedReader�_buffer�_pos)�self�filename�moder�	mode_code�raws      �*/opt/alt/python312/lib64/python3.12/bz2.py�__init__zBZ2File.__init__%sc��	�"�����
�!��
��]�'�a�'��D�E�E�(��D�E�E��?�"��D�"�I�
�[�
 ��D�#�I�,�]�;�D��
�[�
 ��D�#�I�,�]�;�D��
�[�
 ��D�#�I�,�]�;�D���4�9�:�:��h��e�R�[�[� 9�:�$�X�t�4�D�H� �D�M�"�D�J�
�X�v�
&�'�(�G�*D��D�H�"�D�J��T�U�U��:�:��#��/�/������9�C��,�,�S�1�D�L��D�I�c���	|jtk(ry	|jtk(r|jj	�nM|jt
k(r:|jj|jj��d|_	|jr|jj	�d|_d|_
t|_d|_y#d|_d|_
t|_d|_wxYw#	|jr|jj	�d|_d|_
t|_d|_w#d|_d|_
t|_d|_wxYwxYw)NF)r rr"r2�closer#rrr$�flushr�r4s r9r=z
BZ2File.closeas��	�
�:�:��%��	$��z�z�Z�'����"�"�$����{�*������t�/�/�5�5�7�8�#'�� �
$��=�=��H�H�N�N�$���� %��
�)��
�#���� ��� %��
�)��
�#����
$��=�=��H�H�N�N�$���� %��
�)��
�#���� ��� %��
�)��
�#���s0�A;C?�&C�"C<�?E-�&E�'!E-�"E*�*E-c�*�	|jtk(S�N)r rr?s r9�closedzBZ2File.closedys��*��z�z�\�)�)r;c�X�	|j�|jj�SrA)�_check_not_closedr�filenor?s r9rEzBZ2File.fileno~s"��A���� ��x�x��� � r;c�\�	|j�xr|jj�SrA)�readabler2�seekabler?s r9rHzBZ2File.seekable�s#��7��}�}��:�4�<�<�#8�#8�#:�:r;c�J�	|j�|jtk(SrA)rDr r"r?s r9rGzBZ2File.readable�s ��=���� ��z�z�Z�'�'r;c�J�	|j�|jtk(SrA)rDr r#r?s r9�writablezBZ2File.writable�s ��=���� ��z�z�[�(�(r;c�Z�	|j�|jj|�SrA)�_check_can_readr2�peek)r4�ns  r9rNzBZ2File.peek�s,��	�
	
�����|�|� � ��#�#r;c�Z�	|j�|jj|�SrA)rMr2r�r4�sizes  r9rzBZ2File.read�s*��	�
	
�����|�|� � ��&�&r;c��	|j�|dkrtj}|jj	|�S)Nr)rMr0�DEFAULT_BUFFER_SIZEr2�read1rQs  r9rUz
BZ2File.read1�s<��	�	
�����!�8��)�)�D��|�|�!�!�$�'�'r;c�Z�	|j�|jj|�SrA)rMr2�readinto)r4�bs  r9rWzBZ2File.readinto�s*��	�	
�����|�|�$�$�Q�'�'r;c���	t|t�s't|d�std��|j	�}|j�|jj|�S�N�	__index__zInteger argument expected)r%�intr+r,r[rMr2�readlinerQs  r9r]zBZ2File.readline�sV��	��$��$��4��-�� ;�<�<��>�>�#�D������|�|�$�$�T�*�*r;c���	t|t�s't|d�std��|j	�}|j�|jj|�SrZ)r%r\r+r,r[rMr2�	readlinesrQs  r9r_zBZ2File.readlines�sV��	��$��$��4��-�� ;�<�<��>�>�#�D������|�|�%�%�d�+�+r;c�0�	|j�t|ttf�rt	|�}nt|�}|j}|jj|�}|jj|�|xj|z
c_|SrA)�_check_can_writer%r'�	bytearray�len�
memoryview�nbytesr$rrrr3)r4�data�length�
compresseds    r9rz
BZ2File.write�s{��	�	
�����d�U�I�.�/���Y�F��d�#�D��[�[�F��%�%�.�.�t�4�
������z�"��	�	�V��	��
r;c�D�	tjj||�SrA)r-�
BaseStream�
writelines)r4�seqs  r9rkzBZ2File.writelines�s"��	��&�&�1�1�$��<�<r;c�\�	|j�|jj||�SrA)�_check_can_seekr2�seek)r4�offset�whences   r9rozBZ2File.seek�s,��
	�	
�����|�|� � ���0�0r;c��	|j�|jtk(r|jj	�S|j
SrA)rDr r"r2�tellr3r?s r9rszBZ2File.tells:��/���� ��:�:��#��<�<�$�$�&�&��y�y�r;N)r)r)���)�__name__�
__module__�__qualname__r:r=�propertyrBrErHrGrKrNrrUrWr]r_rrkr0�SEEK_SETrors�r;r9rrs|���:�A�:�x$�0�*��*�!�
;�(�
)�

$�'�
(�(�+�,��*=�#%�+�+�1�$r;rc�$�	d|vrd|vr5td|����|�td��|�td��|�td��|jdd�}t|||��}d|vr-tj|�}tj
||||�S|S)	N�trXrz0Argument 'encoding' not supported in binary modez.Argument 'errors' not supported in binary modez/Argument 'newline' not supported in binary moderr
)r!�replacerr0�
text_encoding�
TextIOWrapper)r5r6r�encoding�errors�newline�bz_mode�binary_files        r9rrs����&�d�{��$�;��4�9�:�:����O�P�P����M�N�N����N�O�O��l�l�3��#�G��(�G�=�I�K�
�d�{��#�#�H�-������X�v�w�G�G��r;c�^�	t|�}|j|�|j�zSrA)rrr>)rfr�comps   r9rr9s-�����'�D��=�=�������-�-r;c��	g}|rSt�}	|j|�}|j|�|jstd��|j}|r�Sdj|�S#t$r|rY��wxYw)NzACompressed data ended before the end-of-stream marker was reachedr;)rrr/�append�eofr!�unused_data�join)rf�results�decomp�ress    r9rrDs�����G�
� �"��	��#�#�D�)�C�	���s���z�z��@�A�
A��!�!����8�8�G�����	����		�s�A*�*A9�7A9)rrNNN)r)�__all__�
__author__�builtinsrr*r0r(r-�_bz2rrrr"r#rjrrrrzr;r9�<module>r�se���-��5�
�*�	�	��/����
���r�l�%�%�r�j-.�-1�'�T.�r;