AlkantarClanX12

Your IP : 3.133.145.17


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

�

�Q�fa���	ddlZddlZddlZddlZddlZddlZddlZddlZgd�Zd\Z	Z
ZZZ
d\ZZdZdZdZdZd	ej(zZd
edddfd�Zd�ZGd
�d�ZGd�de�ZGd�dej6�ZGd�dej:�Zd�Zd�Z Gd�dejB�Z"	d!de#de$fd�Z%efdd�d�Z&d�Z'd�Z(e)d k(re(�yy)"�N)�BadGzipFile�GzipFile�open�compress�
decompress)�����)rr	r��	ir
�rbc���	d|vrd|vr5td|����|�td��|�td��|�td��|jdd�}t|ttt
jf�rt|||�}n2t|d�st|d	�rtd|||�}ntd
��d|vr-tj|�}tj||||�S|S)N�t�bzInvalid mode: z0Argument 'encoding' not supported in binary modez.Argument 'errors' not supported in binary modez/Argument 'newline' not supported in binary mode��read�writez1filename must be a str or bytes object, or a file)
�
ValueError�replace�
isinstance�str�bytes�os�PathLiker�hasattr�	TypeError�io�
text_encoding�
TextIOWrapper)�filename�mode�
compresslevel�encoding�errors�newline�gz_mode�binary_files        �+/opt/alt/python312/lib64/python3.12/gzip.pyrrs����$�d�{��$�;��4�9�:�:����O�P�P����M�N�N����N�O�O��l�l�3��#�G��(�S�%����5�6��x��-�@��	��6�	"�g�h��&@��t�W�m�X�F���K�L�L�
�d�{��#�#�H�-������X�v�w�G�G���c�N�|jtjd|��y)Nz<L)r�struct�pack)�output�values  r*�write32ur1Is���L�L����T�5�)�*r+c�0�eZdZ	dd�Zd�Zdd�Zd�Zd�Zy)�_PaddedFilec�N�||_t|�|_||_d|_y�Nr)�_buffer�len�_length�file�_read)�self�f�prepends   r*�__init__z_PaddedFile.__init__Ss"������7�|�����	���
r+c��|j�|jj|�S|j|z|jkr:|j}|xj|z
c_|j||jS|j}d|_|j|d|jj||jz
|z�zS�N)r:r9rr8r6)r;�sizers   r*rz_PaddedFile.readYs����:�:���9�9�>�>�$�'�'��:�:������,��:�:�D��J�J�$��J��<�<��T�Z�Z�0�0��:�:�D��D�J��<�<���&��9�9�>�>�$�t�|�|�"3�D�"8�9�:�
:r+c��|j�||_n|xjt|�zc_yt|j�|_d|_yr5)r:r6r7r8)r;r=s  r*r=z_PaddedFile.prependfs?���:�:��"�D�L��J�J�#�g�,�&�J���4�<�<�(�����
r+c�T�d|_d|_|jj|�Sr@)r:r6r9�seek)r;�offs  r*rDz_PaddedFile.seekos#����
�����y�y�~�~�c�"�"r+c��y�NT��r;s r*�seekablez_PaddedFile.seekablet���r+N)r+)�__name__�
__module__�__qualname__r>rr=rDrJrHr+r*r3r3Ns �� ��:��#�
r+r3c��eZdZy)rN)rLrMrNrHr+r*rrxs��@r+rc�&�eZdZ	d�Zd�Zd�Zd�Zy)�_WriteBufferStreamc��||_yr@)�	gzip_file)r;rSs  r*r>z_WriteBufferStream.__init__~s	��"��r+c�8�|jj|�Sr@)rS�
_write_raw)r;�datas  r*rz_WriteBufferStream.write�s���~�~�(�(��.�.r+c��y)NFrHrIs r*rJz_WriteBufferStream.seekable�s��r+c��yrGrHrIs r*�writablez_WriteBufferStream.writable�rKr+N)rLrMrNr>rrJrYrHr+r*rQrQ|s��B�#�/��r+rQc����eZdZ	dZddeddfd�Zed��Zd�Zd�Z	�fd�Z
d�Zd�Zd	�Z
dd
�Zdd�Zd�Zed
��Zd�Zej(fd�Zd�Zd�Zd�Zd�Zd�Zej8fd�Zdd�Z�xZS)rNc��	|r"d|vsd|vrtdj|���|r	d|vr|dz
}|�!tj||xsd�x}|_|�&t|dd�}t
|ttf�sd}ntj|�}|}|�
t|dd�}|jd	�r8t|_
t|�}tj |�|_||_n�|jd
�r�|�ddl}|j)dt*d
�t,|_
|j/|�t1j2|t0j4t0j6t0j8d�|_||_t>|_ tjBtE|�|j@��|_ntdj|���||_#|jt,k(r|jI|�yy)Nr�UzInvalid mode: {!r}rr�namerr#�r)�w�a�xrz�GzipFile was opened for writing, but this will change in future Python releases.  Specify the mode argument for opening it for writing.r	)�buffer_size)%r�format�builtinsr�	myfileobj�getattrrrrr�fspath�
startswith�READr#�_GzipReaderr�BufferedReaderr6r]�warnings�warn�
FutureWarning�WRITE�_init_write�zlib�compressobj�DEFLATED�	MAX_WBITS�
DEF_MEM_LEVELr�_write_mtime�_WRITE_BUFFER_SIZE�_buffer_size�BufferedWriterrQ�fileobj�_write_gzip_header)	r;r"r#r$rz�mtime�origmode�rawrls	         r*r>zGzipFile.__init__�s���	�B�S�D�[�C�4�K��1�8�8��>�?�?��C�t�O��C�K�D��?�'/�}�}�X�t�|�t�'L�L�G�d�n����w���3�H��h��e��5����y�y��*�H����<��7�F�D�1�D��?�?�3���D�I��g�&�C��,�,�S�1�D�L� �D�I�
�_�_�_�
-�����
�
�L�"�1�	&�
�D�I����X�&� �,�,�]�-1�]�]�.2�n�n�_�-1�-?�-?�-.�	0�D�M�
!&�D�� 2�D���,�,�-?��-E�9=�9J�9J�L�D�L��1�8�8��>�?�?�����9�9����#�#�M�2�r+c�D�	|jjjSr@)r6r~�_last_mtimerIs r*r|zGzipFile.mtime�s��>��|�|���+�+�+r+c�r�t|j�}d|ddzdztt|��zdzS)Nz<gzip r���� �>)�reprrz�hex�id)r;�ss  r*�__repr__zGzipFile.__repr__�s8���������!�A�b�'�!�C�'�#�b��h�-�7�#�=�=r+c�~�||_tjd�|_d|_g|_d|_d|_y�Nr+r)r]rq�crc32�crcrA�writebuf�bufsize�offset)r;r"s  r*rpzGzipFile._init_write�s4����	��:�:�c�?�����	���
������r+c�t��|j�|jj�t�|��Sr@)�_check_not_closedr6�flush�super�tell�r;�	__class__s �r*r�z
GzipFile.tell�s+������ ��������w�|�~�r+c�2�|jjd�|jjd�	tjj	|j
�}t
|t�s|jd�}|jd�r|dd}d}|rt}|jjt|�jd��|j}|�tj�}t|jt!|��|t"k(rd}n|t$k(rd	}nd
}|jj|�|jjd�|r|jj|d
z�yy#t$rd}Y��wxYw)N���zlatin-1s.gz���r+r�����)rzrr�path�basenamer]rr�encode�endswith�UnicodeEncodeError�FNAME�chrrv�timer1�int�_COMPRESS_LEVEL_BEST�_COMPRESS_LEVEL_FAST)r;r$�fname�flagsr|�xfls      r*r{zGzipFile._write_gzip_headersJ�������;�'������7�#�		��G�G�$�$�T�Y�Y�/�E��e�U�+����Y�/���~�~�f�%��c�r�
������E������3�u�:�,�,�Y�7�8��!�!���=��I�I�K�E�����s�5�z�*��0�0��C�
�2�
2��C��C������3�������7�#���L�L���u�w��/���%"�	��E�	�s�A F�F�Fc���|j�|jtk7rddl}t	|j
d��|j�td��|jj|�S)Nrz$write() on read-only GzipFile objectz!write() on closed GzipFile object)
r�r#ro�errno�OSError�EBADFrzrr6r)r;rVr�s   r*rzGzipFile.write#sZ����� ��9�9�����%�+�+�'M�N�N��<�<���@�A�A��|�|�!�!�$�'�'r+c��t|ttf�rt|�}nt	|�}|j
}|dkDr�|jj|jj|��|xj|z
c_	tj||j�|_|xj|z
c_
|Sr5)rr�	bytearrayr7�
memoryview�nbytesrzrrrArqr�r�r�)r;rV�lengths   r*rUzGzipFile._write_raw.s����d�U�I�.�/���Y�F��d�#�D��[�[�F��A�:��L�L���t�}�}�5�5�d�;�<��I�I���I��z�z�$����1�D�H��K�K�6�!�K��
r+c��|j�|jtk7rddl}t	|j
d��|jj|�S)Nrz$read() on write-only GzipFile object)r�r#rir�r�r�r6r�r;rAr�s   r*rz
GzipFile.read?sD����� ��9�9�����%�+�+�'M�N�N��|�|� � ��&�&r+c���	|j�|jtk7rddl}t	|j
d��|dkrtj}|jj|�S)Nrz%read1() on write-only GzipFile object)
r�r#rir�r�r�r�DEFAULT_BUFFER_SIZEr6�read1r�s   r*r�zGzipFile.read1Fs^��	E�	
��� ��9�9�����%�+�+�'N�O�O��!�8��)�)�D��|�|�!�!�$�'�'r+c��|j�|jtk7rddl}t	|j
d��|jj|�S)Nrz$peek() on write-only GzipFile object)r�r#rir�r�r�r6�peek)r;�nr�s   r*r�z
GzipFile.peekSsD����� ��9�9�����%�+�+�'M�N�N��|�|� � ��#�#r+c��|jduSr@)rzrIs r*�closedzGzipFile.closedZs���|�|�t�#�#r+c�H�|j}|�y	|jtk(rs|jj	�|j|jj	��t||j�t||jdz�n-|jtk(r|jj�d|_|j}|rd|_|j�yy#d|_|j}|rd|_|j�wwxYw)N���)
rzr#ror6r�rrr1r�rAri�closere)r;rzres   r*r�zGzipFile.close^s����,�,���?��	"��y�y�E�!����"�"�$��
�
�d�m�m�1�1�3�4���$�(�(�+���$�)�)�j�"8�9����d�"����"�"�$��D�L����I��!%������!��� �D�L����I��!%������!��s�B3C2�2/D!c��|j�|jtk(ri|jj	�|j
j
|jj	|��|j
j	�yyr@)r�r#ror6r�rzrr)r;�	zlib_modes  r*r�zGzipFile.flushrs`����� ��9�9����L�L��� ��L�L���t�}�}�2�2�9�=�>��L�L��� �	r+c�8�	|jj�Sr@)rz�filenorIs r*r�zGzipFile.filenozs��	�
�|�|�"�"�$�$r+c�x�	|jtk7rtd��|jj	d�y)NzCan't rewind in write moder)r#rir�r6rDrIs r*�rewindzGzipFile.rewind�s1��	!��9�9����6�7�7������!�r+c�(�|jtk(Sr@)r#rirIs r*�readablezGzipFile.readable�s���y�y�D� � r+c�(�|jtk(Sr@)r#rorIs r*rYzGzipFile.writable�s���y�y�E�!�!r+c��yrGrHrIs r*rJzGzipFile.seekable�rKr+c��|jtk(r�|j�|jj	�|t
jk7r.|t
jk(r|j|z}ntd��||jkrtd��||jz
}d|jz}t||jz�D]}|j|��|jd||jzz�|jS|jtk(r,|j�|jj||�S|jS)NzSeek from end not supportedzNegative seek in write moder�)r#ror�r6r�r�SEEK_SET�SEEK_CURr�rr�rx�rangerrirD)r;r��whence�count�chunk�is      r*rDz
GzipFile.seek�s���9�9����"�"�$��L�L��� �����$��R�[�[�(�!�[�[�6�1�F�$�%B�C�C�����#��;�<�<��T�[�[�(�E��D�-�-�-�E��5�D�$5�$5�5�6���
�
�5�!�7��J�J�u���(9�(9� 9�:�;�
�{�{��	�Y�Y�$�
��"�"�$��<�<�$�$�V�V�4�4��{�{�r+c�X�|j�|jj|�Sr@)r�r6�readline)r;rAs  r*r�zGzipFile.readline�s#����� ��|�|�$�$�T�*�*r+�r�) rLrMrNrer�r>�propertyr|r�rpr�r{rrUrr�r�r�r�rq�Z_SYNC_FLUSHr�r�r�r�rYrJrr�rDr��
__classcell__�r�s@r*rr�s������I� $�4�3�T��S3�j�,��,�>���
0�@	(��"'�(�$��$��$�"�("�.�.�!�%��!�"��#%�+�+��.+r+rc���	|j|�}t|�|kr>|j|t|�z
�}|std��||z
}t|�|kr�>|S)N�ACompressed file ended before the end-of-stream marker was reached)rr7�EOFError)�fpr�rVrs    r*�_read_exactr��si���
�7�7�1�:�D�

�d�)�a�-��G�G�A��D�	�M�"����>�?�
?���	���d�)�a�-��Kr+c���	|jd�}|dk(ry|dk7rtd|z��tjdt	|d��\}}}|dk7rtd��|t
zr.tjdt	|d��\}t	||�|tzr	|jd	�}|r|d
k(rn�|tzr	|jd	�}|r|d
k(rn�|tzrt	|d�|S)Nr	r+r�zNot a gzipped file (%r)z<BBIxxrzUnknown compression methodz<Hrr�)	rrr-�unpackr��FEXTRAr��FCOMMENT�FHCRC)r��magic�method�flag�
last_mtime�	extra_lenr�s       r*�_read_gzip_headerr��s����
�G�G�A�J�E���|������3�e�;�<�<�!'���x��R��9K�!L��V�T�:�
��{��6�7�7��f�}��]�]�4��R��);�<�
�	��B�	�"��e�|������
�A���7�
����h�������
�A���7�
����e�|��B����r+c�B��eZdZ�fd�Zd�Zd�Zdd�Zd�Z�fd�Z�xZ	S)rjc���t�|�t|�tjtj
��d|_d|_y)N��wbitsT)r�r>r3rq�_ZlibDecompressorrt�_new_memberr�)r;r�r�s  �r*r>z_GzipReader.__init__�s>���
����R��$�*@�*@� $����	�	0� �����r+c�F�tjd�|_d|_yr�)rqr��_crc�_stream_sizerIs r*�
_init_readz_GzipReader._init_read�s���J�J�s�O��	���r+c�B�t|j�}|�y||_y)NFT)r��_fpr�)r;r�s  r*r�z_GzipReader._read_gzip_header�s$��&�t�x�x�0�
����%���r+c��|dkr|j�S|sy	|jjr8|j�d|_|j
di|j��|_|jr9|j�|j�s|j|_
yd|_|jjr<|jjt�}|jj||�}n|jjd|�}|jj dk7r/|jj#|jj �|dk7rndk(rt%d����at'j(||j*�|_|xj,t/|�z
c_|xjt/|�z
c_	|S)Nrr+TFr�rH)�readall�
_decompressor�eof�	_read_eofr��_decomp_factory�_decomp_argsr�r��_pos�_size�needs_inputr�r�READ_BUFFER_SIZEr�unused_datar=r�rqr�r�r�r7)r;rA�buf�
uncompresss    r*rz_GzipReader.read�s����!�8��<�<�>�!���
��!�!�%�%�
��� �#'�� �%9�T�%9�%9�&)��'�'�&)��"�������!��-�-�/�!%���D�J��#(�� ��!�!�-�-��h�h�m�m�$4�5��!�/�/�:�:�3��E�
�!�/�/�:�:�3��E�
��!�!�-�-��4���� � ��!3�!3�!?�!?�@��S� ���c�z�� B�C�C�G�L�J�J�z�4�9�9�5��	����S��_�,���	�	�S��_�$�	��r+c��tjdt|jd��\}}||jk7r-tdt
|��dt
|j�����||jdzk7rtd��d}|dk(r!|jjd�}|dk(r�!|r|jj|�yy)	N�<IIrzCRC check failed z != r��!Incorrect length of data producedr�r)
r-r�r�r�r�rr�r�rr=)r;r��isize�cs    r*r�z_GzipReader._read_eof+s���
�}�}�U�K����!�,D�E���u��D�I�I���S��Z�=@����^�M�N�
N�
�t�(�(�:�5�
6��A�B�B�

���7�l����
�
�a� �A��7�l���H�H���Q��
r+c�0��t�|��d|_yrG)r��_rewindr�r�s �r*r
z_GzipReader._rewind@s���
������r+r�)
rLrMrNr>r�r�rr�r
r�r�s@r*rjrj�s'��� ���3�j �* � r+rjr$�returnc
��	|�tj�}|tk(rd}n|tk(rd}nd}tjdddddt|�|d�S)	Nr	r
rz<BBBBLBB��r�)r�r�r�r-r.r�)r$r|r�s   r*�_create_simple_gzip_headerrEs]���
�}��	�	����,�,���	�.�	.������;�;�z�4��q�!�S��Z��c�J�Jr+)r|c��	|dk(rtj||d��St||�}tjdtj
|�t
|�dz�}|tj||d��z|zS)Nrr)�levelr�z<LLr�i�)rqrrr-r.r�r7)rVr$r|�header�trailers     r*rrZsw���
��z��}�}�T��b�A�A�
'�
�u�
=�F��k�k�%����D�!1�C��I�
�4J�L�G��T�]�]�4�}�C�H�H��
�r+c��	g}	tj|�}t|��dj|�St	j
tj��}|j||j�d�}|jrt|j�dkrtd��tjd|jdd�\}}|t	j|�k7rt!d��|t|�dzk7rt!d��|j#|�|jddj%d	�}��=)
Nr+r�rr�rzCRC check failedr�r	r�)r�BytesIOr��joinrq�
decompressobjrtrr�r�r7rr�r-r�r�r�append�lstrip)rV�decompressed_membersr��do�decompressedr�r�s       r*rrls�����
�
�Z�Z��
���R� �(��8�8�0�1�1�
�
�
�t�~�~�o�
6���}�}�T�"�'�'�)�*�%5�6���v�v��R�^�^�,�q�0��0�1�
1��m�m�E�2�>�>�"�1�+=�>���V��$�*�*�\�*�*��0�1�1��c�,�'�*�4�5��A�B�B��#�#�L�1��~�~�a�b�!�(�(��1��#r+c��ddlm}|d��}|j�}|jddd��|jd	dd
��|jdddd
��|jdddgd��|j	�}t
}|jrt}n|jrt}|jD�]�}|jr�|dk(rAtddtjj��}tj j}n�|dddk7rtj"d|���t%|d�}t'j$|ddd�}nl|dk(rBtjj}tddtj j|��}n%t'j$|d�}t%|dzd�}	|j)t*�}|sn|j-|��*|tj jur|j/�|tjjus��}|j/����y)Nr)�ArgumentParserzeA simple command line interface for the gzip module: act like gzip, but do not delete the input file.)�descriptionz--fast�
store_truezcompress faster)�action�helpz--bestzcompress betterz-dz--decompresszact like gunzip instead of gzip�args�*�-r9)�nargs�default�metavarrr)r"r#rzr�z.gzzfilename doesn't end in .gz: �wb)r"r#rzr$)�argparser"�add_mutually_exclusive_group�add_argument�
parse_args�_COMPRESS_LEVEL_TRADEOFF�fastr��bestr�r'rr�sys�stdin�buffer�stdout�exitrrdrrrr�)	r"�parser�groupr'r$�argr<�gr�s	         r*�mainr>�s���'�
�	,�-�F�
�/�/�1�E�	���x��;L��M�	���x��;L��M�	���t�^�L�>��@�����c�C�5�&��I�����D�,�M��y�y�,�
�	
���,�
��y�y���?�?��c�z��b�t�S�Y�Y�=M�=M�N���J�J�%�%���r�s�8�u�$��H�H�<�S�G�D�E���d�O���M�M�#�c�r�(�D�1���c�z��I�I�$�$���b�t�S�Z�Z�=N�=N�+8�:���M�M�#�t�,����u��d�+����F�F�+�,�E���
�G�G�E�N�	�

�C�J�J�%�%�%�
�G�G�I��C�I�I�$�$�$�
�G�G�I�5r+�__main__r@)*r-r5r�rrqrdr�_compression�__all__�FTEXTr�r�r�r�riror�r2r�rr�rwrr1r3r�r�	RawIOBaserQ�
BaseStreamrr�r��DecompressReaderrjr�rrrrr>rLrHr+r*�<module>rFs)��%�����	��
G��(6�%��u�f�e�X����e�����������/�/�/���,@��t�T�+�Z+�
'�'�TA�'�A������`+�|�&�&�`+�F	
� "�J_ �,�/�/�_ �F(,�K�c�K�05�K�*"6����$2�2.�`�z���F�r+