AlkantarClanX12

Your IP : 18.118.144.109


Current Path : /proc/self/root/opt/alt/python311/lib64/python3.11/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python311/lib64/python3.11/__pycache__/bz2.cpython-311.opt-2.pyc

�

c��fG.���	gd�ZdZddlmZddlZddlZddlZddlm	Z	m
Z
dZdZdZ
Gd�d	ej��Z		dd�Zdd
�Zd�ZdS))�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�Zejfd�Zd�ZdS)r�r�	��
compresslevelc�F�	d|_d|_t|_d|cxkrdksnt	d���|dvr
d}t
}nx|dvrd}t}t|��|_nV|d	vrd
}t}t|��|_n4|dvrd}t}t|��|_nt	d
|�����t|tttj
f��r$t||��|_d|_||_n>t|d��st|d��r||_||_nt!d���|jt
krAt#j|jt&t(���}t+j|��|_dSd|_dS)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/python311/lib64/python3.11/bz2.py�__init__zBZ2File.__init__%s���	�"�����
�!��
��]�'�'�'�'�a�'�'�'�'��D�E�E�E��?�"�"��D�"�I�I�
�[�
 �
 ��D�#�I�,�]�;�;�D���
�[�
 �
 ��D�#�I�,�]�;�;�D���
�[�
 �
 ��D�#�I�,�]�;�;�D����*�4�4�9�:�:�:��h��e�R�[� 9�:�:�	V�$�X�t�4�4�D�H� �D�M�"�D�J�J�
�X�v�
&�
&�	V�'�(�G�*D�*D�	V��D�H�"�D�J�J��T�U�U�U��:��#�#��/�����9�9�9�C��,�S�1�1�D�L�L�L��D�I�I�I�c��	|jtkrdS	|jtkr|j���nH|jt
kr8|j�|j�	����d|_	|j
r|j���d|_d|_
t|_d|_dS#d|_d|_
t|_d|_wxYw#	|j
r|j���d|_d|_
t|_d|_n&#d|_d|_
t|_d|_wxYwwxYw)NF)r rr"r2�closer#rrr$�flushr�r4s r9r=z
BZ2File.closeas_��	�
�:��%�%��F�	$��z�Z�'�'���"�"�$�$�$�$���{�*�*�����t�/�5�5�7�7�8�8�8�#'�� �
$��=�%��H�N�N�$�$�$���� %��
�)��
�#������ ��� %��
�)��
�#���#�#�#�#��
$��=�%��H�N�N�$�$�$���� %��
�)��
�#����� ��� %��
�)��
�#���#�#�#�#�#�#�#�#s0�A2C1� C�#C.�1E�3 D5�"E�5#E�Ec�$�	|jtkS�N)r rr?s r9�closedzBZ2File.closedys��*��z�\�)�)r;c�^�	|���|j���SrA)�_check_not_closedr�filenor?s r9rEzBZ2File.fileno~s)��A���� � � ��x��� � � r;c�^�	|���o|j���SrA)�readabler2�seekabler?s r9rHzBZ2File.seekable�s&��7��}�}���:�4�<�#8�#8�#:�#:�:r;c�L�	|���|jtkSrA)rDr r"r?s r9rGzBZ2File.readable�s$��=���� � � ��z�Z�'�'r;c�L�	|���|jtkSrA)rDr r#r?s r9�writablezBZ2File.writable�s$��=���� � � ��z�[�(�(r;rc�`�	|���|j�|��SrA)�_check_can_readr2�peek)r4�ns  r9rNzBZ2File.peek�s3��	�
	
�������|� � ��#�#�#r;���c�`�	|���|j�|��SrA)rMr2r�r4�sizes  r9rzBZ2File.read�s1��	�
	
�������|� � ��&�&�&r;c��	|���|dkrtj}|j�|��S)Nr)rMr0�DEFAULT_BUFFER_SIZEr2�read1rRs  r9rVz
BZ2File.read1�sB��	�	
�������!�8�8��)�D��|�!�!�$�'�'�'r;c�`�	|���|j�|��SrA)rMr2�readinto)r4�bs  r9rXzBZ2File.readinto�s1��	�	
�������|�$�$�Q�'�'�'r;c���	t|t��s3t|d��std���|���}|���|j�|��S�N�	__index__zInteger argument expected)r%�intr+r,r\rMr2�readlinerRs  r9r^zBZ2File.readline�ss��	��$��$�$�	$��4��-�-�
=�� ;�<�<�<��>�>�#�#�D��������|�$�$�T�*�*�*r;c���	t|t��s3t|d��std���|���}|���|j�|��Sr[)r%r]r+r,r\rMr2�	readlinesrRs  r9r`zBZ2File.readlines�ss��	��$��$�$�	$��4��-�-�
=�� ;�<�<�<��>�>�#�#�D��������|�%�%�d�+�+�+r;c�<�	|���t|ttf��rt	|��}nt|��}|j}|j�|��}|j	�
|��|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�Y�F�F��d�#�#�D��[�F��%�.�.�t�4�4�
�����z�"�"�"��	�	�V��	�	��
r;c�D�	tj�||��SrA)r-�
BaseStream�
writelines)r4�seqs  r9rlzBZ2File.writelines�s"��	��&�1�1�$��<�<�<r;c�b�	|���|j�||��SrA)�_check_can_seekr2�seek)r4�offset�whences   r9rpzBZ2File.seek�s3��
	�	
�������|� � ���0�0�0r;c��	|���|jtkr|j���S|jSrA)rDr r"r2�tellr3r?s r9rtzBZ2File.tells@��/���� � � ��:��#�#��<�$�$�&�&�&��y�r;N)r)r)rP)�__name__�
__module__�__qualname__r:r=�propertyrBrErHrGrKrNrrVrXr^r`rrlr0�SEEK_SETrprt�r;r9rrs[�������:�A�:�:�:�:�:�x$�$�$�0�*�*��X�*�!�!�!�
;�;�;�(�(�(�
)�)�)�

$�
$�
$�
$�'�'�'�'�
(�
(�
(�
(�(�(�(�+�+�+�+�,�,�,�,����*=�=�=�#%�+�1�1�1�1�$����r;rrr
c�R�	d|vrd|vrtd|�����n3|�td���|�td���|�td���|�dd��}t|||���}d|vr+tj|��}tj||||��S|S)	N�trYrz0Argument '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�4�9�:�:�:�����O�P�P�P����M�N�N�N����N�O�O�O��l�l�3��#�#�G��(�G�=�I�I�I�K�
�d�{�{��#�H�-�-�����X�v�w�G�G�G��r;c�v�	t|��}|�|��|���zSrA)rrr>)rgr�comps   r9rr9s5�����'�'�D��=�=���������-�-r;c��	g}|rlt��}	|�|��}n#t$r|rYn9�wxYw|�|��|jstd���|j}|�ld�|��S)NzACompressed data ended before the end-of-stream marker was reachedr;)rrr/�append�eofr!�unused_data�join)rg�results�decomp�ress    r9rrDs�����G�
�
"� �"�"��	��#�#�D�)�)�C�C���	�	�	��
����		����
	���s�����z�	A��@�A�A�
A��!���
"��8�8�G���s�+�;�;)rr
NNN)r
)�__all__�
__author__�builtinsrr*r0r(r-�_bz2rrrr"r#rkrrrrzr;r9�<module>r�s����-�-�-��5�
�*�*�*�*�*�*�	�	�	�	�	�	�	�	�����/�/�/�/�/�/�/�/����
���r�r�r�r�r�l�%�r�r�r�j-.�-1�'�'�'�'�T.�.�.�.�����r;