403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.59
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python315/Lib/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/test/__pycache__/test_gzip.cpython-315.opt-2.pyc
R
>lqj�c�F�]PHs]PHs]PHs]PHs]PHs]PHs]PHs]PHs]QH G	s	G
s
]QHGs]QH0G
s
]QH0GsGs]QH0Gs]QH0GsGsGs]QHPGsGs\O.Q2s\O.Q	2sQ
sQs\O8O;\O<2Q*sQ
Q\O@2s!QQ\OD2s#QQ\#2s$QQ\#2s%Qs&\QQ\OD22s'\(Q6Xc\OR2P!P!)�)�PIPE�Popen)�mock)�catch_unraisable_exception)�force_not_colorized_test_class�
import_helper)�	os_helper)�_4G�
bigmemtest�requires_subprocess)�assert_python_ok�assert_python_failure�gzip�zlibsy  int length=DEFAULTALLOC, err = Z_OK;
  PyObject *RetVal;
  int flushmode = Z_FINISH;
  unsigned long start_total_out;

s�/* zlibmodule.c -- gzip-compatible data compression */
/* See http://www.gzip.org/zlib/
/* See http://www.winimage.com/zLibDll for Windows */
z-gzdirc�4`�\sQs]'snQsQsQsQsUsP!)�UnseekableIOc��P
!)F���selfs&�#C:\Python315\\Lib\test\test_gzip.py�seekable�UnseekableIO.seekable(s���c�$�[Og�N��io�UnsupportedOperationrs&r�tell�UnseekableIO.tell+����%�%�%rc�$�[Ogrr)r�argss&*r�seek�UnseekableIO.seek.r!rr)	�__name__�
__module__�__qualname__�__firstlineno__rrr$�__static_attributes__�__classdictcell__��
__classdict__s@rrr's�����&�&�&rrc�F`�\sQs]2sn\O
sQsQsQs	Us
P!)�BaseTestc�H�[OUO2P!r�r�unlink�filenamers&r�setUp�BaseTest.setUp5���������'rc�H�[OUO2P!rr1rs&r�tearDown�BaseTest.tearDown8r6rr)r&r'r(r)r�TESTFNr3r4r8r*r+r,s@rr/r/2s�������H�(�(�(rr/c�`�\sQs]<snQAQksQsQsQsQsQs	Qs
QsQ	sQ
s
Qs\\]Q5Q
2sQsQsQsQsQsQsQsQsQsQsQsQsQsQsQs Qs!Qs"Qs#Q s$Q!s%Q"s&Q#s'Q$s(Q%s)Q&s*Q's+Q(s,Q)s-Q*s.Q+s/Q,s0Q-s1Q.s2Q/s3Q0s4Q1s5Q2s6Q3s7Q4s8Q5s9Q6s:Q7s;Q8s<Q9s=Q:s>Q;s?Q<s@Q=sAQ>sBQ?sCQ@sDUsEP!)B�TestGzipc���[U2o[OUOQU*29^tt^2oUO	U2oPPP2UOW[
U22[OUOQU*29^tt^2oUOUO2U2PPP2P!)%fhK�9h)%fhP!9h)�w�r)�bytesr�GzipFiler3�write�assertEqual�len�read)r�data�mode�b_data�f�ls&&&   r�write_and_read_back�TestGzip.write_and_read_back=s����t���
�]�]�4�=�=�#�d�(�
3�
3�q�����
�A�4�����C��K�(�
�]�]�4�=�=�#�d�(�
3�
3�q����Q�V�V�X�v�.�4�
3�4�
3��4�
3�
3�s#�C� !C�C	�C	�C/	�'C/	c��[OUOQ29^tt^2oUO[]2*2UO2UO
2[[Q2%c%[OUO
22UO2PPP2WO2P!)%fhK"9h)�wb�fsync)rrAr3rB�data1�flush�fileno�hasattr�osrO�close�rrIs& r�
test_write�TestGzip.test_writeEs~��
�]�]�4�=�=�$�
/�
/�1�
�G�G�E�B�J��
�G�G�I�
�H�H�J��r�7�#�#��������$�
�G�G�I�0�	
���	�0�
/�s�AC�=4C�C	�C	c�x�[OUO2o[O	UQ29^tt^2oUO[]2*2PPP2UOWO[2UOUOUO2[O	UQ29^tt^2oUO[2PPP2[O	U29^tt^2oUO2oPPP2UOW[]3*2UOUO[2UOUOUO2P!)%fhCK.9h)%fhK�9h)%fhK�9h)r>�a)r�FakePathr3rrArBrP�assertIsInstance�name�strrCrE)rr3rI�ds&   r�"test_write_read_with_pathlike_file�+TestGzip.test_write_read_with_pathlike_fileSs
���%�%�d�m�m�4��
�]�]�8�S�
)�
)�Q�
�G�G�E�B�J��*����a�f�f�c�*����������/�
�]�]�8�S�
)�
)�Q�
�G�G�E�N�*�
�]�]�8�
$�
$������A�%�����E�B�J�'����a�f�f�c�*����������/�*�
)�
)��*�
)��
$�
$�s6�F�	F�F)�F	�F	�F&	�F&	�)F9	�2F9	c���UO[[]2*22[[[	Q222oUOQ,QNQ5oUOU2P!)�2��B)�shape)�rg�)rK�
memoryviewrPr@�range�cast)r�mrFs&  r�test_write_memoryview�TestGzip.test_write_memoryviewdsL��� � ��E�B�J�!7�8��u�U�3�Z�(�)���v�v�c��v�)��� � ��&rc�R�UO[[]2*22P!)rc)rK�	bytearrayrPrs&r�test_write_bytearray�TestGzip.test_write_bytearrayjs��� � ��5�2�:�!6�7rc�j�UO[OQ[](*22P!)�I)rK�arrayrPrs&r�test_write_array�TestGzip.test_write_arrayms��� � ����S�%�"�*�!=�>rc	��[OUOQ29^tt^2oUO[29^tt^2UOP2PPP2UO[29^tt^2UO,2PPP2UO[2PPP2[OUOQ29^tt^2oUOUO2[2PPP2P!)%fhK�9h)%fhK�9h)%fhK�9h)%fhP!9h�rN�rb)	rrAr3�assertRaises�	TypeErrorrBrPrCrErVs& r�test_write_incompatible_type�%TestGzip.test_write_incompatible_typeps����]�]�4�=�=�$�
/�
/�1��"�"�9�-�-������.��"�"�9�-�-������.�
�G�G�E�N�0��]�]�4�=�=�$�
/�
/�1����Q�V�V�X�u�-�0�
/�.�-��-�-��0�
/��0�
/�
/�s_�D3�D
	�%D3�?D 	�D3�%E�
D
�D
�D3� D0
�)D0
�+D3�3E	�<E	�E	�E	c�
�UO2[OUOQ29^tt^2oUO	2oPPP2UOW[]2*2P!)%fhK/9h)r?)rWrrAr3rErCrP�rrIr_s&  r�	test_read�TestGzip.test_read}sP������
�]�]�4�=�=�#�
.�
.�!�����A�/�����E�"�H�%�/�
.�s�A2�2B	�;B	c���UO2,o]o[OUOQ29^tt^2oUO	2oU%fLEUOU2U[
U2*
oUOUO2U2J_PPP2UOQOU2[]2*2P!)%fhK>9h)rr?r)rWrrAr3�read1�appendrDrCr�joinrP)r�blocks�nreadrIr_s&    r�
test_read1�TestGzip.test_read1�s�����������
�]�]�4�=�=�#�
.�
.�!���G�G�I�����
�
�a� ���Q����� � �����5�1�/�	
������&�)�5�2�:�6�/�
.�s�C�AC�C$	�C$	c��[OQ2o[OUOQ29^tt^2oUOU2PPP2[
[U22o[OUOQ29^tt^2oUOU2oPPP2UOW[U22UOV12P!)%fhK�9h)%fhKQ9h��
rNr?i�)
rT�urandomrrAr3rBrprD�readintorC)r�
large_datarI�buf�nbytess&    r�
test_readinto�TestGzip.test_readinto�s����Z�Z�
�+�
�
�]�]�4�=�=�$�
/�
/�1�
�G�G�J��0���J��(��
�]�]�4�=�=�#�
.�
.�!��Z�Z��_�F�/������Z��1�����)�0�
/��/�
.�s$�C�C1�C.	�'C.	�1D	�:D	c	��[OQ2o[OUOQ29^tt^2oUOU2PPP2]o[
[U22o[U2o[OUOQ29^tt^2o[]�2FDIoUOVSP2oU%fL,V7*
oUOUO2U2JK	PPP2UOVA2UOW]2P!)%fhK�9h)%fhKH9hr�)rTr�rrAr3rBrprDrirj�	readinto1rCr�
assertGreater)rr�rIr�r��memview�countr�s&       r�test_readinto1�TestGzip.test_readinto1�s����Z�Z�
�+�
�
�]�]�4�=�=�$�
/�
/�1�
�G�G�J��0�����J��(���S�/��
�]�]�4�=�=�#�
.�
.�!��s������W�V�_�5�������� � �����5�1�$�/�	
����)����5�!�$�0�
/��/�
.�s*�D*�#*D=�/D=�*D:	�3D:	�=E
	�E
	)�size�memusec���[O[]Q5o[O[O
U2QQ5oUO
UOU2[2P!)���
compresslevelrz��fileobjrG)r�compressrPrAr�BytesIOrCrE)rr��
compressedrIs&&  r�test_read_large�TestGzip.test_read_large�sI���]�]�5��]�:�
��M�M�"�*�*�Z�"8�t�M�D����������u�-rc���UO2[OUOQ2oUOoUOUO2UO2UOUO2UO[29^tt^2UO]2PPP2UO[29^tt^2UO]2PPP2UO[29^tt^2UO2PPP2[OUOQ2oUOoUOUO2UO2UOUO2UO[29^tt^2UOQ2PPP2UO[29^tt^2UO2PPP2P!)%fhCK_9h)%fhCK<9h)%fhCK9h)%fhK�9h)%fhP!9h)r?r>r)rWrrAr3r��assertFalse�closedrU�
assertTruer{�
ValueErrorrEr$rrBrQ)rrIr�s&  r�test_io_on_closed_object�!TestGzip.test_io_on_closed_object�sw��
	
�����M�M�$�-�-��-���)�)��������(�	���	�������'�
�
�
�z�
*�
*�
�F�F�1�I�+�
�
�
�z�
*�
*�
�F�F�1�I�+�
�
�
�z�
*�
*�
�F�F�H�+�
�M�M�$�-�-��-���)�)��������(�	���	�������'�
�
�
�z�
*�
*�
�G�G�C�L�+�
�
�
�z�
*�
*�
�G�G�I�+�
*�+�
*�
*��
*�
*�
*��
*�
*�
*��+�
*��
*�
*�
*�sZ�!H	�H�H1�7I�.I�	H	�H	�H.	�&H.	�1I	�:I	�I	�I	�I)	�!I)	c���UO2[OUOQ29^tt^2oUO	[
]*2PPP2[OUOQ29^tt^2oUO
2oPPP2UOW[]2*[
]**2P!)%fhK�9h)%fhKT9h)�abrz)	rWrrAr3rB�data2rErCrPr�s&  r�test_append�TestGzip.test_append�s�������
�]�]�4�=�=�$�
/�
/�1�
�G�G�E�B�J��0��]�]�4�=�=�$�
/�
/�1�����A�0�����U�2�X�%��(�3�4�0�
/��0�
/�s#�C�C$�C!	�C!	�$C4	�-C4	c	��[OUOQ]	29^tt^2oUOQ2PPP2[	]]�2FDFo[OUOQ]	29^tt^2oUOQ2PPP2JH	[OUOQ29^tt^2oQoUOQ2oVE*
oU%cJ$PPP2UO
WQ2P!)%fhK�9h)%fhJ�9h)%fhKK9h)rN�ar�rzri s�aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)rrAr3rBrjrErC)rrI�i�zgfile�contents�ztxts&     r�test_many_append�TestGzip.test_many_append�s����]�]�4�=�=�$��
2�
2�a�
�G�G�D�M�3��q�#��A����t�}�}�d�A�6�6�!�����
�7�6��
�]�]�4�=�=�$�
/�
/�6��H���{�{�4�(��� ���t�U�0�	
����8�,�3�
2��7�6�6��0�
/�s;�D�>D	�"D/�+D/�D	�D	�D,
�$D,
�/D?	�8D?	c�Z�[OUOQ29^tt^2oUO[]2*2PPP2[OUOQ29^tt^2oUOUO
2[]2*2PPP2UO[29^tt^2[OUOQ2PPP2P!)%fhK�9h)%fhKk9h)%fhP!9h)�xbrz)	rrAr3rBrPrCrEr{�FileExistsErrorrVs& r�test_exclusive_write�TestGzip.test_exclusive_write�s���
�]�]�4�=�=�$�
/�
/�1�
�G�G�E�B�J��0�
�]�]�4�=�=�$�
/�
/�1����Q�V�V�X�u�r�z�2�0�
�
�
��
/�
/��M�M�$�-�-��.�0�
/�	0�
/��
/�
/��
/�
/�
/�s5�C3�7,D�!D�3D	�<D	�D	�D	�D*	�"D*	c	��UO2[OUOQ29^tt^2o[O
U29^tt^2oSTt,tFDp3MJ	ooPPP2PPP2UO
W]2[OP	Q5*2P!ttoh)%fhKL9h)%fhKW9h)rz��keepends)	rWrrAr3r�BufferedReaderrCrP�
splitlines)rrIr?�line�liness&    r�test_buffered_reader�TestGzip.test_buffered_reader�s���	
����
�]�]�4�=�=�$�
/�
/�1��"�"�1�%�%��*+�,�!�$��!��,�&�0�	
�����U�%5�%5�t�%5�%D� D�E��-�&�%��0�
/�sA�C�B/	�B*�)B/	�+C�*B/	�/B?
�8B?
�:C�C	�C	c�X�UO2[OUOQ29^tt^2o]oUO	U2oU%f	U]6wcL/UO[
U2U6*2U]*]2*oJQPPP2P!)%fhP!9h�rz)rWrrAr3�readliner�rD)rrI�line_length�Ls&   r�
test_readline�TestGzip.test_readlinesy�������]�]�4�=�=�$�
/�
/�1��K���J�J�{�+���[�A�-�u�����A��+� 5�6�*�Q��"�4��
0�
/�
/�
/�s�B�B�0B�B)	�!B)	c��UO2[OUOQ29^tt^2oUO	2oPPP2[OUOQ29^tt^2oUO	]�2oU,6XfJPPP2P!)%fhK_9h)%fhP!9hr�)rWrrAr3�	readlines)rrIr�s&  r�test_readlines�TestGzip.test_readliness��������]�]�4�=�=�$�
/�
/�1����
�A�0��]�]�4�=�=�$�
/�
/�1���K�K��$����7�E�0�
/�0�
/��0�
/�
/�s)�B"�;B5�B5�"B2	�+B2	�5C	�>C	c���UO2[OUO29^tt^2oUO	2oUO2oU%fLxUO	2oUO
U2[U2]
6�c]
oL[U2oUOU2oUOUPUU2UO
U2J�PPP2P!)%fhP!9h�r�)
rWrrAr3rr�r$rDrErC)rrI�oldpos�line1�newpos�amount�line2s&      r�test_seek_read�TestGzip.test_seek_reads��������]�]�4�=�=�
)�
)�Q��������
�
����e���������v���u�:�b�=��F� ��Z�F����v���� � ��w����7����v��*�
)�
)�
)�s�)C&�#1C&�AC&�&C7	�/C7	c�R�UO2[OUO29^tt^2oUO	]
2UO]
]Q5UO	]
2oPPP2UO
W[Q*2P!)%fhK/9h)r�)�whence:��N)rWrrAr3rEr$rCrP)rrI�ys&  r�test_seek_whence�TestGzip.test_seek_whence2so�������]�]�4�=�=�
)�
)�Q�
�F�F�2�J�
�F�F�2�a�F� ����r�
�A�*�	
����E�%�L�)�	*�
)�s�6B�B&	�B&	c��[OUOQ29^tt^2o[]Q]2FD%oUO	U2UOQ2J'	PPP2P!)%fhP!9h)r>rdsGZ
)rrAr3rjr$rB)rrI�poss&  r�test_seek_write�TestGzip.test_seek_write<sR��
�]�]�4�=�=�#�
.�
.�!��Q��R�(�����s������ �)�/�
.�
.�
.�s�8A,�,A=	�5A=	c��UO2[OUOQ29^tt^2oUO	UO
OQ2PPP2[OUO2[OUOQ29^tt^2oUO	UO
OQ2PPP2P!)%fhK�9h)%fhP!9h)r?rz�xr�)	rWrrAr3rC�	myfileobjrGrr2rVs& r�	test_mode�TestGzip.test_modeCs�������
�]�]�4�=�=�#�
.�
.�!����Q�[�[�-�-�t�4�/�������'�
�]�]�4�=�=�#�
.�
.�!����Q�[�[�-�-�t�4�/�
.�/�
.��/�
.�
.�s#�'C"�1'C5�"C2	�+C2	�5D	�>D	c	��QFDlo[OUOU29^tt^2oUOUQ2UO	UO
UO2PPP2Jn	P!)%fhJ�9h)rNr]ry)rrAr3�
assertHasAttrrCr])rrGrIs&  r�test_1647484�TestGzip.test_1647484Ks]�� �D����t�}�}�d�3�3�q��"�"�1�f�-�� � �������7�4�3�!�3�3�3�s�9A7	�7B
�B
c�J�UO2[OUOQ29^tt^2oUO	UO
Q2UO
UO
OUO2PPP2P!)%fhP!9h)rzr])rWrrAr3r�r�rCr]rVs& r�test_paddedfile_getattr� TestGzip.test_paddedfile_getattrQsb������
�]�]�4�=�=�$�
/�
/�1����q�y�y�&�1����Q�Y�Y�^�^�T�]�]�;�0�
/�
/�
/�s�A
B�B"	�B"	c�(�Qo[OUOQUQ59^tt^2oUO[2PPP2[OUO29^tt^2oUOUQ2UO
UO2UO2oUOU[2UOUOU2PPP2P!)%fhK�9h)%fhP!9h)��[r>��mtimer�)
rrAr3rBrPr��assertIsNoner�rErC)rr��fWrite�fRead�dataReads&    r�
test_mtime�TestGzip.test_mtimeWs�����
�]�]�4�=�=�#�u�]�
=�
=���L�L���>�
�]�]�4�=�=�
)�
)�U����u�g�.����e�k�k�*��z�z�|�H����X�u�-����U�[�[�%�0�*�
)�>�
=��
)�
)�
)�s$�C-�3A0D�-C=	�6C=	�D	�	D	c��QFCD,o[OUOQUQ59^tt^2oUO[2PPP2[OUO29^tt^2oUO]2UO
UO]2PPP2[O[UQ5o[O[OU2Q59^tt^2oUO]2UO
UO]2PPP2CJ/	QFD�o[OQ[U2Q59^tt^2[OUOQ29^tt^2oUO[2PPP2[OUO29^tt^2oUO]2UO
UO]2PPP2PPP2J�	P!)%fhCK�9h)%fhCK�9h)%fhCJL9h)%fhK�9h)%fhKn9h)%fhCJS9h)r�r>r��r�z	time.time)�return_value)���l)rrAr3rBrPrErCr�r�rr�r�patch�float)rr�r�r��datacs&    r�test_mtime_out_of_range� TestGzip.test_mtime_out_of_rangebs��� �E����t�}�}�c���?�?�6����U�#�@����t�}�}�-�-���
�
�1�
�� � ����a�0�.��M�M�%�u�M�5�E����r�z�z�%�'8��9�9�U��
�
�1�
�� � ����a�0�:�9�!�!�E����K�e�E�l�C�C��]�]�4�=�=�#�6�6�&��L�L��'�7��]�]�4�=�=�1�1�U��J�J�q�M��$�$�U�[�[�!�4�2�D�C�!�@�?�?��-�-�-��:�9�9��7�6��1�1��D�C�C�s��H	�8.H+	�;.H?	�%)I:	�I
�$/I:	�.I'
�I:	�H(
� H(
�+H<
�4H<
�?I
�I
�I$�I$�I:	�'I7�0I7�2I:	�:J
�J
c�$�Qo[OUOQU]	Q59^tt^2oUO[2PPP2[UOQ29^tt^2oUO
]2oUOUQ2UO
]2oUOUQ2UOOQ2Q*oQoUO
]2oUOV�2UO
]2o	UOU	[OQ	U22UO
]2o
UOU
Q
2UO
]2oUOUQ2UO
[U22oUOV�2UO[OUO2O ]*
2UO
]2o
UOU
Q2UO
]2oUOU[OQ	[[222PPP2P!)%fhCK9h[c	QoQoCK�h9h)%fhP!9h)
r�r>)r�r�rz���zLatin-1�rz<i���s��d�)rrAr3rBrP�openrErC�encode�UnicodeEncodeError�struct�packrDr$rT�stat�st_size)rr�r�r��idBytes�cmByte�expectedname�
expectedflags�	flagsByte�
mtimeBytes�xflByte�osByte�	nameBytes�
crc32Bytes�
isizeBytess&              r�
test_metadata�TestGzip.test_metadatavs�����
�]�]�4�=�=�#�u�a�]�
P�
P�TZ��L�L���Q��$�-�-��
&�
&�%��j�j��m�G����W�k�2��Z�Z��]�F����V�W�-�
(�#�}�}�3�3�I�>��H�� '�
�
�
�
�1�
�I����Y�6����A��J����Z����T�5�)A�B��j�j��m�G����W�g�.��Z�Z��]�F����V�W�-��
�
�3�|�#4�5�I����Y�5�
�J�J�r�w�w�t�}�}�-�5�5��9�:����A��J����Z�)9�:����A��J����Z����T�3�u�:�)F�G�W'�
&�Q�
P�
P��&�
(�"�� '�
�
(��'�
&�
&�sO�I�+AI>�3$I(�E3I>�I%	�I%	�(	I;�2I;�7I>�:I;�;I>�>J	�J	c�R�[OUmUO2P!r)r�TESTFN_ASCIIr3r!rs&r�test_metadata_ascii_name�!TestGzip.test_metadata_ascii_name�s��!�.�.��
����rc�0�,QNo]oSFD�vq4oUOU29^tt^2[OUOQUQ5oU9^tt^2UO	[
2PPP2[
UOQ29^tt^2oUOU2UO]2oUOV�2PPP2PPP2J�	P!)%fhKx9h)%fhK19h)%fhCJ
9h)�fastr>r�rz))r(r��)�best�	r
)�tradeoff�r)
�subTestrrAr3rBrPrr$rErC)	r�cases�	xflOffsetr]�level�expectedXflByter�r�rs	&        r�test_compresslevel_metadata�$TestGzip.test_compresslevel_metadata�s���
��
�	�.3�*�T�/����d�#�#����t�}�}�c���O���V��L�L��'���$�-�-��.�.�%��J�J�y�)�#�j�j��m�G��$�$�W�>�/�	$�#�/4��V��.�.��	$�#�#�sM�-D	�C
�-&D	�4C0
�D	�C-�&C-�(D	�0D�9D�;D	�D
�D
c��[OUOQ29^tt^2oUOQ2PPP2[OUOQ2oUO	2U9^tt^2PPP2UOQ2[OUOQ29^tt^2o]]*PPP2UOQ2P!)%fhK�9h)%fhK�9h[cK�h9h)%fhKZ9h[cP!h9h)rNsxxxrzz4__enter__ on a closed file didn't raise an exceptionz1/0 didn't raise an exception)rrAr3rBrU�failr��ZeroDivisionErrorrVs& r�test_with_open�TestGzip.test_with_open�s���
�]�]�4�=�=�$�
/�
/�1�
�G�G�F�O�0��M�M�$�-�-��.��	���	�	N�����

�I�I�L�M�	7����t�}�}�d�3�3�q��!��4�

�I�I�5�6�#0�
/��
����	��	��
4�3�� �	��	�s}�C(�5
D�?C;�D�(D2�
D�
D2�(C8	�1C8	�;D	�D	�D�	D�D�D�D/	�(D/	�*D2�2	E�<E�Ec�D�[OUOQ29^tt^2oUO[]2*2PPP2[UOQ29^tt^2oUOQ2PPP2[OUOQ29^tt^2oUO
2oUOU[]2*Q2PPP2P!)%fhK�9h)%fhK�9h)%fhP!9h)rNr�rzzIncorrect data in files2)rrAr3rBrPrrErCr�s&  r�test_zero_padded_file�TestGzip.test_zero_padded_file�s���
�]�]�4�=�=�$�
/�
/�1�
�G�G�E�B�J��0��$�-�-��
&�
&�!�
�G�G�L�!�'��]�]�4�=�=�$�
/�
/�1�����A����Q���
�,D�E�0�
/�0�
/��'�
&��0�
/�
/�s5�C(�-C;�//D�(C8	�1C8	�;D	�D	�D	�D	c�P�UO[O[2P!r)�assertIsSubclassr�BadGzipFile�OSErrorrs&r�test_gzip_BadGzipFile_exception�(TestGzip.test_gzip_BadGzipFile_exception�s�����d�.�.��8rc��[UOQ29^tt^2oUO[]2*2PPP2[OUOQ29^tt^2oUO
[OUO2PPP2P!)%fhKm9h)%fhP!9h)rNr?)	rr3rBrPrrAr{r?r�)r�files& r�test_bad_gzip_file�TestGzip.test_bad_gzip_file�sv��
�$�-�-��
&�
&�$��J�J�u�r�z�"�'�
�]�]�4�=�=�#�
.�
.�$����d�.�.����?�/�
.�'�
&��
.�
.�
.�s#�B"�-+B5�"B2	�+B2	�5C	�>C	c��[]2*o[2o[OUQQ59^tt^2oUO	U2PPP2UO2o[U2o[OUQQ59^tt^2oUO
UO2U2PPP2P!)%fhKu9h)%fhP!9h)rcrNr�rz)rPrrrArB�getvaluerCrE)r�uncompressedr�rIr�s&    r�test_non_seekable_file�TestGzip.test_non_seekable_file�s����r�z���n��
�]�]�3�T�]�
2�
2�a�
�G�G�L�!�3��\�\�^�
��:�&��
�]�]�3�T�]�
2�
2�a����Q�V�V�X�|�4�3�
2�	3�
2��3�
2�
2�s#�B7�!C
�7C	�C	�
C	�C	c��[]�*o[OUOQ29^tt^2oUO	U2PPP2Qo[OUOQ29^tt^2o]!Um]oU2FDZoUO
U2oUQ6XcL@UOUO[U22U2U[U2*
oJ\	UOUO]d2Q2UOU[U22PPP2P!)%fhK�9h)%fhP!9h)��rNc3�F �[]]2]
2FDoUw�	J
	J3h)T)rj)�ns r�sizes�!TestGzip.test_peek.<locals>.sizes�s �����q�"�b�)�A��G�*�s�!rzr)
rPrrAr3rB�max_read_chunk�peekrCrErD)rrIrIrPr�rO�ss&      r�	test_peek�TestGzip.test_peek�s����s�{��
�]�]�4�=�=�$�
/�
/�1�
�G�G�L�!�0�	�
�]�]�4�=�=�$�
/�
/�1�!�A���E��W���F�F�1�I����8��� � �����A����3���Q�����
���Q�V�V�C�[�#�.����U�C��$5�6�0�
/�0�
/��0�
/�
/�s*�D2�<,E�)A?E�2E	�;E	�E	�E	c	���[]2*OQ2OP	Q5oUO2[OUOQ29^tt^2o[OUQQ59^tt^2oUOUO2U2PPP2PPP2P!)%fhK9h)%fhP!9h)rc�asciir�r?��encoding)rP�decoder�rWrrAr3r�
TextIOWrapperrCr�)rr�rI�ts&   r�test_textio_readlines�TestGzip.test_textio_readliness������#�#�G�,�7�7��7�F������
�]�]�4�=�=�#�
.�
.�!��!�!�!�g�6�6�!�� � ������6�7�/�
.�6�6��/�
.�
.�s0�&!C
�!B:	�(C
�:C

�C

�C
�
C	�C	c	��[UOQ29^tt^2o[OUQQ59^tt^2oUO	Q2UOUOUO2UOUO2UO22UOUO[O2UOUO2P
2UOUO2P	2UOUO2P	2UOUOP
2PPP2UOWOP	2UOUOUO2UO[ UO2UOUO[O2UOUO2P
2UOUO2P	2UOUO2P	2PPP2[UOQ29^tt^2o[OUQQ59^tt^2oUO	Q2UOUOUO2UOUO2UO22UOUO[O2UOUO2P
2UOUO2P	2UOUO2P	2UOUOP
2PPP2UOWOP	2UOUOUO2UO[ UO2UOUO[O2UOUO2P
2UOUO2P	2UOUO2P	2PPP2[UOQ29^tt^2o[OUQQ59^tt^2oUO	Q	2UOUOUO2UOUO2UO22UOUO[O2UOUO2P
2UOUO2P	2UOUO2P	2UOUOP
2PPP2UOWOP	2UOUOUO2UO[ UO2UOUO[O2UOUO2P
2UOUO2P	2UOUO2P	2PPP2[UOQ
29^tt^2o[OUQQ59^tt^2oUOUO#2Q2UOUOUO2UOUO2UO22UOUO[O$2UOUO2P	2UOUO2P
2UOUO2P	2UOUOP
2PPP2UOWOP	2UOUOUO2UO[ UO2UOUO[O$2UOUO2P	2UOUO2P
2UOUO2P	2PPP2P!)%fhCK�9h)%fhCK9h)%fhCK�9h)%fhCK�9h)%fhCK�9h)%fhCK�9h)%fhCK9h)%fhP!9h�
r�r�r�sonerNr>stwor�rZsthreerzr?stwothree)rr3rrArBrCr]rRrG�WRITE�assertIs�readable�writablerr�r{�AttributeErrorrE�READ)r�rawrIs&  r�test_fileobj_with_name�TestGzip.test_fileobj_with_names$��
�$�-�-��
&�
&�#����s���5�5�������� � �������2�� � �����S�Z�Z�\�:�� � �������4��
�
�a�j�j�l�E�2��
�
�a�j�j�l�D�1��
�
�a�j�j�l�D�1��
�
�a�h�h��.�6�
�M�M�!�(�(�D�)����Q�V�V�S�X�X�.����n�a�h�h�7����Q�V�V�T�Z�Z�0��M�M�!�*�*�,��.��M�M�!�*�*�,��-��M�M�!�*�*�,��-�!'�$�$�-�-��
&�
&�#����s���5�5�������� � �������2�� � �����S�Z�Z�\�:�� � �������4��
�
�a�j�j�l�E�2��
�
�a�j�j�l�D�1��
�
�a�j�j�l�D�1��
�
�a�h�h��.�6�
�M�M�!�(�(�D�)����Q�V�V�S�X�X�.����n�a�h�h�7����Q�V�V�T�Z�Z�0��M�M�!�*�*�,��.��M�M�!�*�*�,��-��M�M�!�*�*�,��-�!'�$�$�-�-��
&�
&�#����s���5�5������!�� � �������2�� � �����S�Z�Z�\�:�� � �������4��
�
�a�j�j�l�E�2��
�
�a�j�j�l�D�1��
�
�a�j�j�l�D�1��
�
�a�h�h��.�6�
�M�M�!�(�(�D�)����Q�V�V�S�X�X�.����n�a�h�h�7����Q�V�V�T�Z�Z�0��M�M�!�*�*�,��.��M�M�!�*�*�,��-��M�M�!�*�*�,��-�!'�$�$�-�-��
&�
&�#����s���5�5��� � �����;�7�� � �������2�� � �����S�Z�Z�\�:�� � �������3��
�
�a�j�j�l�D�1��
�
�a�j�j�l�E�2��
�
�a�j�j�l�D�1��
�
�a�h�h��.�6�
�M�M�!�(�(�D�)����Q�V�V�S�X�X�.����n�a�h�h�7����Q�V�V�T�Y�Y�/��M�M�!�*�*�,��-��M�M�!�*�*�,��.��M�M�!�*�*�,��-�!'�
&�k6�5�5��'�
&�
&��&6�5�5��'�
&�
&��&6�5�5��'�
&�
&��&6�5�5��'�
&�
&�s�� d?�Dd+	�C4d?�& e'�De	�C4e'�, f�De;	�C4f�2 f7�Df#	�-C4f7�+d<
�4d<
�6	d?�?e	�e	�e$
�e$
�	e'�'e8	�0e8	�;f
�f
�	f�f 	�f 	�#f4
�,f4
�.	f7�7g	�g	c	�H�[OUO[O[O*[O
*2o[OUQ29^tt^2o[OUQQ59^tt^2oUOQ2UOUOP2UOUO2UO22PPP2UOWOP	2UOUOP2UO[ UO2PPP2[OUO[O[O*[O"*2o[OUQ29^tt^2o[OUQQ59^tt^2oUOQ2UOUOP2UOUO2UO22PPP2UOWOP2UO[ UO2PPP2[OUO[O[O*[O$*2o[OUQ29^tt^2o[OUQQ59^tt^2oUOQ	2UOUOP2UOUO2UO22PPP2UOWOP2UO[ UO2PPP2[OUO[O&2o[OUQ
29^tt^2o[OUQQ59^tt^2oUOUO)2Q2UOUOP2UOUO2UO22PPP2UOWOP2UO[ UO2PPP2P!)%fhCK9h)%fhCK�9h)%fhCK�9h)%fhCK�9h)%fhCK�9h)%fhCK�9h)%fhK�9h)%fhP!9hra)rTrr3�O_WRONLY�O_CREAT�O_EXCL�fdopenrrArBrCr]rRrcr�r{rf�O_TRUNC�O_APPEND�O_RDONLYrE)r�fdrhrIs&   r�test_fileobj_from_fdopen�!TestGzip.test_fileobj_from_fdopen\sz���W�W�T�]�]�B�K�K�"�*�*�$<�r�y�y�$H�
I��
�Y�Y�r�4�
 �
 �C����s���5�5�������� � �����,�� � �����S�Z�Z�\�:�6�
�M�M�!�(�(�D�)����Q�V�V�R�(����n�a�h�h�7�!��W�W�T�]�]�B�K�K�"�*�*�$<�r�z�z�$I�
J��
�Y�Y�r�4�
 �
 �C����s���5�5�������� � �����,�� � �����S�Z�Z�\�:�6�
���Q�V�V�R�(����n�a�h�h�7�
!��W�W�T�]�]�B�K�K�"�*�*�$<�r�{�{�$J�
K��
�Y�Y�r�4�
 �
 �C����s���5�5������!�� � �����,�� � �����S�Z�Z�\�:�6�
���Q�V�V�R�(����n�a�h�h�7�
!��W�W�T�]�]�B�K�K�
0��
�Y�Y�r�4�
 �
 �C����s���5�5��� � �����;�7�� � �����,�� � �����S�Z�Z�\�:�6�
���Q�V�V�R�(����n�a�h�h�7�
!�
 �76�5�5��!�
 �
 ��6�5�5��!�
 �
 ��6�5�5��!�
 �
 ��6�5��!�
 �
 �s��: T�AT	�6A T� U�6AT-	�AU� U)�6AU	�AU)�, V�A+U=	�7AV�T
�T
�	T�T*	�"T*	�-T>
�6T>
�8	U�U	�
U	�U&
�U&
� 	U)�)U:	�2U:	�=V

�V

�V�V!	�V!	c��UO[OQ2UO[OQ2[O	UO
Q2O
2[UO
Q29^tt^2o[O	UQQ59^tt^2oUOUO[O2PPP2[O	UQQ59^tt^2oUOUO[O2PPP2[O	UQQ59^tt^2oUOUO[O2PPP2[O	UQQ59^tt^2oUOUO[O2PPP2UO[29^tt^2[O	UQQ5PPP2PPP2Q
FD{o[UO
U29^tt^2o[O	UQ	59^tt^2oUOUO[O2PPP2PPP2J}	QFD�oQU7c![OUO
2[UO
U29^tt^2oUO[29^tt^2[O	UQ	5oPPP2W9^tt^2UOUO[O2PPP2PPP2J�	P!)%fhCK�9h)%fhCKc9h)%fhCK%9h)%fhCK�9h)%fhCK�9h)%fhCK�9h)%fhCKh9h)%fhCJ�9h)%fhK�9h)%fhK�9h)%fhCJ�9h)rzrN�r+br?r�r>rZr��zr)rzrw)rNr�r�zwb+zab+zxb+)rCrrgrbrAr3rUrrGr{r�rr2�assertWarns�
FutureWarning)rrI�grGs&   r�test_fileobj_mode�TestGzip.test_fileobj_mode�s���������D�)�������T�*��
�
�d�m�m�T�*�0�0�2�
�$�-�-��
'�
'�1����q�s��3�3�q�� � �������3�4����q�s��3�3�q�� � �������4�4����q�s��3�3�q�� � �������4�4����q�s��3�3�q�� � �������4�4��"�"�:�.�.��
�
�a�c�
�2�/�(� �D��d�m�m�T�*�*�a��]�]�1�]�-�-���$�$�Q�V�V�T�Y�Y�7�.�+�*� �:�D��d�{�� � ����/��d�m�m�T�*�*�a��%�%�m�4�4��
�
�a�
�0�A�5��Q��$�$�Q�V�V�T�Z�Z�8��+�*�:�4�3�3��3�3�3��3�3�3��3�3�3��.�.�.��(�
'�
'��.�-�-��+�*�*��5�4���Q��+�*�*�s&� O�.+M1	�'O�+N	�+'O�+N	�='O�$+N-	�%O�4O	�O�O=	�+O)
�
O=	�)P8	�P
�P8	�0+P%
�P8	�1N
�:N
�<	O�N
�N
�	O�N*
�"N*
�$	O�-N>
�6N>
�8	O�O
�
O
�	O�O&	�O&	�)O:�2O:�4	O=	�=P
�P
�P"�P"�P8	�%P5�.P5�0P8	�8Q

�Q

c�6�UOo[OU2o[O	UQ29^tt^2oUO[]2*2PPP2UOWOU2[O	UQ29^tt^2oUOUO2[]2*2PPP2UOUOU2[O	UQ29^tt^2oUOUO2[]2*2PPP2UOUOU2P!)%fhCK9h)%fhK�9h)%fhKU9hry)
r3rT�fsencoderrArBrPrCr]rE)r�str_filename�bytes_filenamerIs&   r�test_bytes_filename�TestGzip.test_bytes_filename�s����}�}�����\�2��
�]�]�>�4�
0�
0�A�
�G�G�E�B�J��1��������0�
�]�]�>�4�
0�
0�A����Q�V�V�X�u�r�z�2�1��������0�
�]�]�<��
.�
.�!����Q�V�V�X�u�r�z�2�/��������.�1�
0�
0��1�
0��/�
.�s6�E!�!,E5�,F�!E2	�*E2	�5F	�>F	�F	�F	c�
	�[O2o[OUQQ59^tt^2oUO	[
]2*2UO
UOP2UO[OUO2UO
UO[O2UOUO2P
2UOUO2P	2UOUO!2P	2UOUO"P
2PPP2UOWO"P	2UO
UOP2UO[$UO2UO
UO[O2UOUO2P
2UOUO2P	2UOUO!2P	2UO']2[OUQQ59^tt^2oUO
UO)2[
]2*2UO
UOP2UO[OUO2UO
UO[O*2UOUO2P	2UOUO2P
2UOUO!2P	2UOUO"P
2PPP2UOUO"P	2UO
UOP2UO[$UO2UO
UO[O*2UOUO2P	2UOUO2P
2UOUO!2P	2P!)%fhCK'9h)%fhCK	9h)rNr�rz)rr�rrArBrPrCr]r{rrRrGrbrcrdrerr�rfr$rErg)r�biorIs&  r�test_fileobj_without_name�"TestGzip.test_fileobj_without_name�s����j�j�l��
�]�]�3�T�]�
2�
2�a�
�G�G�E�B�J�����Q�V�V�R�(����b�5�5�q�x�x�@����Q�V�V�T�Z�Z�0��M�M�!�*�*�,��.��M�M�!�*�*�,��-��M�M�!�*�*�,��-��M�M�!�(�(�E�*�3�	
�
�
�a�h�h��%��������$����.�!�(�(�3����������,��
�
�a�j�j�l�E�*��
�
�a�j�j�l�D�)��
�
�a�j�j�l�D�)������
�]�]�3�T�]�
2�
2�a����Q�V�V�X�u�r�z�2����Q�V�V�R�(����b�5�5�q�x�x�@����Q�V�V�T�Y�Y�/��M�M�!�*�*�,��-��M�M�!�*�*�,��.��M�M�!�*�*�,��-��M�M�!�(�(�E�*�3�	
�
�
�a�h�h��%��������$����.�!�(�(�3����������+��
�
�a�j�j�l�D�)��
�
�a�j�j�l�E�*��
�
�a�j�j�l�D�)�C3�
2�
2��$3�
2�
2�s%�D	Q�DQ1�Q.	�&Q.	�1R	�:R	c	�0�UOQ*o[UOQ29^tt^2o[OV!QQ59^tt^2oUO	[
]2*2UO
UOU2PPP2PPP2[UOQ29^tt^2o[OV!QQ59^tt^2oUO
UO2[
]2*2UO
UOU2PPP2PPP2[OUOQ29^tt^2oUO
UO2[
]2*2UO
UOUO2PPP2P!)%fhCK39h)%fhCK?9h)%fhK�9h)%fhK�9h)%fhP!9h)�newrN)r�r3rGrz)	r3rrrArBrPrCr]rE)r�	filename2r�rIs&   r�test_fileobj_and_filename�"TestGzip.test_fileobj_and_filename�sU���M�M�E�)�	��4�=�=�$�'�'�7��m�m�G�d�m�K�K�q�
�G�G�E�B�J�����Q�V�V�Y�/�L�(��4�=�=�$�'�'�7��m�m�G�d�m�K�K�q����Q�V�V�X�u�r�z�2����Q�V�V�Y�/�L�(�
�]�]�4�=�=�$�
/�
/�1����Q�V�V�X�u�r�z�2����Q�V�V�T�]�]�3�0�
/�L�K�K��(�'�'��
L�K��(�'��
0�
/�
/�ss� G
�9F6	�G
�: G1�AG	�"G1�AH�6G
�?G
�	G
�
G	�G	�G.
�'G.
�)G1�1H	�:H	�H	�
H	c���[OQ[Q2*]	Q5oUO[	U2[
O2[
OU2o[OUQ5oUOUO]2Q2][
O*oUOUOOO2UQ2P!)rg��>Ar�rz)Excessive amount of data was decompressed)rr��int�
assertLessrDr�DEFAULT_BUFFER_SIZEr�rArCrE�assertLessEqual�_bufferrhr)r�bomb�decomp�
max_decomps&   r�test_decompress_limited� TestGzip.test_decompress_limited�s����}�}�U�S��X�-�Q�}�?������D�	�2�#9�#9�:��z�z�$������t��,��������Q���/���/�/�/�
����V�^�^�/�/�4�4�6�
�7�	9rc��[[1FD�oQFD�o[OU,UN3oUO	[U2[2[O[OU2QQ59^tt^2oUO	UO2U2PPP2J�	J�	P!)%fhJ�9h)r�rzr��rr�)r-)r+)rPr�rr�rC�typer@rArr�rE)rrFr#rrIs&    r�
test_compress�TestGzip.test_compress�s����E�N�D�.���
�
�d�2�T�2��� � ��e��e�4��]�]�2�:�:�e�+<�4�]�H�H�A��$�$�Q�V�V�X�t�4�I�H�/�#�I�H�H�s�!B6
�6C�?Cc
�"�Qo[[1FD�oQFD�oUOV#Q59^tt^2[OU,UN3QU-oUO[
U2[2[O[OU2QQ59^tt^2oUO]2UOUOU2PPP2PPP2J�	J�	P!)%fhK"9h)%fhJ�9h)r�)rFr#r�rzr�r�)
rPr�r.rr�rCr�r@rArr�rEr�)rr�rFr#rrIs&     r�test_compress_mtime�TestGzip.test_compress_mtime�s������E�N�D�.���\�\�t�\�7�7� �M�M�$�C��C�U�C�E��$�$�T�%�[�%�8����r�z�z�%�/@�t��L�L�PQ����q�	��(�(����%�8�M�8�7�/�#�
M�L��8�7�7�s0�A.C=
�".C*�C=
�*C:�3C:�5C=
�=D�Dc���[O[]Q5o[O[2oUOV2[O[PQ5oUO	V2[O[OU2QQ59^tt^2oUO]2UOUO]2PPP2P!)%fhP!9h)rr�rzr�)rr�rPrC�assertNotEqualrArr�rEr�r�)rr�datac2�datac3rIs&    r�test_compress_mtime_default�$TestGzip.test_compress_mtime_defaults����
�
�e�1�
�-�����u�%������'����u�D��1�����E�*�
�]�]�2�:�:�f�#5�D�]�
A�
A�Q�
�F�F�1�I����q�w�w��*�B�
A�
A�
A�s�&.C�C/	�'C/	c
�R�QFD�oUOUQ59^tt^2[O[]UQ5o[O[]UQ5oUO	[U2UO[U2PPP2J�	P!)%fhJ�9h)rr��r�r��r�*)r.rr�rP�assertIn�assertNotIn)rr��
nocompress�yescompresss&   r�test_compress_correct_level�$TestGzip.test_compress_correct_levelsu���E����E��*�*�!�]�]�5���]�O�
�"�m�m�E��%�m�P���
�
�e�Z�0�� � ���4�	+�*��*�*�*�s�A%B	�B&
�B&
c�$�QFDsoUOUQ59^tt^2[O[]UQ5oUO	[
OQUQ*2U]�1Q2PPP2Ju	P!)%fhJ�9h)rr�r�z<IxB:rhr�Nz:Gzip header does not properly set either mtime or OS byte.r�)r.rr�rPrCr�unpack)rr�r�s&  r�test_issue112346�TestGzip.test_issue112346sm���E����E��*�*��=�=��a�u�=�M��� � ��M�M�&�(�4�.�9��C�L�P��+�*��*�*�*�s�AA>	�>B
�B
c	���[[1FD�o[O2o[OUQQ59^tt^2oUO
U2PPP2UO[OUO22U2[OU2oUO[OU2U2J�	P!)%fhK�9h)rNr�)rPr�rr�rrArBrC�
decompressrHr�)rrFr�rIrs&    r�test_decompress�TestGzip.test_decompress!s����E�N�D��*�*�,�C����s���6�6�!�����
�7����T�_�_�S�\�\�^�<�d�C��M�M�$�'�E����T�_�_�U�3�T�:�#�6�6�s�C	�C#
�C#
c��[O[2oUO[[O
UPQ2P!)N����rr�rPr{�EOFErrorr��r�compressed_datas& r�!test_decompress_truncated_trailer�*TestGzip.test_decompress_truncated_trailer+�-���-�-��.�����(�D�O�O�_�S�b�5I�Jrc��[O[2oUO[[O
UPQ2P!)N���r�r�s& r�test_decompress_missing_trailer�(TestGzip.test_decompress_missing_trailer/r�rc�.�,QNoSFDaoUOUQ59^tt^2UO[29^tt^2[O	U2PPP2PPP2Jc	P!)%fhK9h)%fhJ�9h)�	�)�header)r�s
��s
��s���s
��s
��)r.r{r�rr�)r�truncated_headersr�s&  r�test_truncated_header�TestGzip.test_truncated_header3sd��
��(�F����V��,�,��&�&�x�0�0��O�O�F�+�1�-�,�(�0�0��-�,�,�s/�B	�A0
�B	�0B�9B�;B	�B
�B
c��Qo[OU2Q*oUQ*oVO]Q2*oUO[O
29^tt^2o[O
U2PPP2UO[WO2QUQ
QUQ
02P!)%fhK?9h)s��extranamecommenti���littlez/Corrupted gzip header. Checksums do not match: �04xz != )
r�crc32�to_bytesr{rr?r�rCr^�	exception)rr��true_crc�
corrupted_crc�corrupted_header�errs&     r�test_corrupted_gzip_header�#TestGzip.test_corrupted_gzip_headerAs���!��
�:�:�f�%��.�� �6�)�
�!�$:�$:�1�h�$G�G��
�
�
�t�/�/�
0�
0�C��O�O�,�-�1�����S�]�]�+�#�#+�C�.��]�3�4G�I�	J�1�
0�s�(B5�5C	�>C	c	�p�[]2*o[OU2PQo[O[O
U2Q59^tt^2oUO
[UO2PPP2[O[O
U2Q59^tt^2oUOUO[U22U2UO
[UO]2PPP2[]]
2FDbo[O[O
UPU2Q59^tt^2oUO
[UO]2PPP2Jd	P!)%fhCK9h)%fhK�9h)%fhJ�9h)rcrr�)rPrr�rArr�r{r�rErCrDrj)rrF�	truncatedrIr�s&    r�test_read_truncated�TestGzip.test_read_truncatedPs���R�x���M�M�$�'���,�	�
�]�]�2�:�:�i�#8�]�
9�
9�Q����h����/�:�
�]�]�2�:�:�i�#8�]�
9�
9�Q����Q�V�V�C��I�.��5����h�����2�:��q�"��A����r�z�z�)�B�Q�-�'@��A�A�Q��!�!�(�A�F�F�A�6�B�A��
:�
9�
9��
9�
9��
B�A�A�s7�!E=�4AF�
"F$	�=F	�F	�F!	�F!	�$F5
�-F5
c���Qo[O[OU2Q59^tt^2oUO	UO2Q2PPP2P!)%fhP!9h)s��cQ�ExtraI-.2�MxrsTest)rrArr�rCrE)r�gzdatarIs&  r�test_read_with_extra�TestGzip.test_read_with_extra^sL��<���]�]�2�:�:�f�#5�]�
6�
6�!����Q�V�V�X�w�/�7�
6�
6�
6�s�!A!�!A2	�*A2	c��[OUOQ29^tt^2oUO[2PPP2[OUOQ29^tt^2oUO
OOO2PPP2P!)%fhKq9h)%fhP!9hry)	rrr3rBrPr�rh�_fp�prependrVs& r�test_prepend_error�TestGzip.test_prepend_errorfsu��
�Y�Y�t�}�}�d�
+�
+�q�
�G�G�E�N�,�
�Y�Y�t�}�}�d�
+�
+�q�
�I�I�M�M���%�%�'�,�
+�,�
+��
+�
+�
+�s#�B)�0/B<�)B9	�2B9	�<C
	�C
	c��[OQ,QN2o[U2UO*o[O	[
O2QQ59^tt^2oUOUOU2U2UOUO2U2PPP2P!)%fhP!9h)�Qr>r�)r���rh�)
rurD�itemsizerrArr�rCrBr)r�q�LENGTHrIs&   r�test_issue44439�TestGzip.test_issue44439ms|���K�K��_�-���Q��!�*�*�$��
�]�]�2�:�:�<�c�]�
:�
:�a����Q�W�W�Q�Z��0����Q�V�V�X�v�.�;�
:�
:�
:�s�)AB5�5C	�>C	c��[O2oQo[OUQQ59^tt^2oUO	U2UO2UO
2oPPP2UO
2oUO[OU2U2UO[29^tt^2[OW2PPP2[O[O'Q5o[OW2o[OU2UOUO22oUOVr2P!)%fhCK9h)%fhK�9h)�important message here.r>r�)�wbits)rr�rrArBrQrHrCr�r{r�r�
decompressobj�	MAX_WBITS�_read_gzip_headerrE)r�b�messagerI�partial_data�	full_datar_�read_messages&       r�test_flush_flushes_compressor�&TestGzip.test_flush_flushes_compressorus���J�J�L��,��
�]�]�1�3�]�
/�
/�1�
�G�G�G��
�G�G�I��:�:�<�L�0��J�J�L�	��������3�W�=��
�
�x�
(�
(��O�O�L�)�)����d�n�n�_��5���J�J�|�$�����q�!��|�|�A�F�F�H�-������/�0�
/�
/��)�
(�s#�2E$�E8�$E5	�-E5	�8F	�F	c��QQ2o[O2oU2o[OUQQ59^tt^2oV4mUO2UO]22UO]dQ5PPP2[O]2]dP,oUOUOU2P!)%fhKB9h)c�8`�\sQsQsnQsQsQQksQsUsP!)�1TestGzip.test_flush_modes.<locals>.FakeCompressor�c��,UmP!r��modesrs&r�__init__�:TestGzip.test_flush_modes.<locals>.FakeCompressor.__init__�s	����
rc��Q!�rr)rrFs&&rr��:TestGzip.test_flush_modes.<locals>.FakeCompressor.compress�s��rc�>�UOOU2Q!r)rr�)rrGs&&rrQ�7TestGzip.test_flush_modes.<locals>.FakeCompressor.flush�s���
�
�!�!�$�'�rr)r)	r&r'r(r)rr�rQr*r+r,s@r�FakeCompressorr��s����
 �
�
�
rr	r>r�)�	zlib_mode)
rr�rrAr�rQr�Z_SYNC_FLUSHrCr)rr	r��fcrI�expected_modess&     r�test_flush_modes�TestGzip.test_flush_modes�s���	�	�
�J�J�L��
�
��
�]�]�1�3�]�
/�
/�1��J�
�G�G�I�
�G�G�B�K�
�G�G�c�G�"�	0�
������	
��	
������>�2�0�
/�s�:B;�;C	�C	c��[O2oQo[OUQQ59^tt^2oUO	U2UO[
U22UO	U2PPP2UO2oUO[OU2U]*2P!)%fhKN9h)r�r>r�)
rr�rrArBr$rDrHrCr�)rr�r�rIrFs&    r�test_write_seek_write�TestGzip.test_write_seek_write�s���
�J�J�L��,��
�]�]�1�3�]�
/�
/�1�
�G�G�G��
�F�F�3�w�<� �
�G�G�G��0��z�z�|���������.��!��<�0�
/�s�=B;�;C	�C	c	��[29^tt^2oUO[29^tt^2[O	[
O2QQ5[O2UOUO2PPP2PPP2P!)%fhK9h)%fhP!9h)r>r�)rry�ResourceWarningrrArr��gc�collectr��
unraisable)r�cms& r�test_refloop_unraisable� TestGzip.test_refloop_unraisable�sq��
(�
)�
)�R��!�!�/�2�2��
�
�b�j�j�l��
�=��
�
���!�!�"�-�-�0�3�*�
)�2�2��*�
)�
)�s/�B2�AB	�
B2�B/
�(B/
�*B2�2C	�;C	)r3)r�)Fr&r'r(r)rKrWr`rmrqrvr}r�r�r�r�r
r	r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr!r%r3r8r;rArErJrUr^rirtr|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrr*r+r,s@rr<r<<sb����/��0�"'�8�?�.�&�
7�
*�%�(�S��#�.�$�.��85�-�&/�	F�
5�
"��&*�!�5�8�<�	1�5�(1H�f�?�(7�*
F�9�@�5�7�,7�G.�R&8�P9�8/�#*�J
4�
9�5�	9�	+�5�	�;�K�K�,�
J�7�0�(�/�0�*3�6
=�	1�	1rr<c�X`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
UsP!)�TestOpen�c��[]2*o[OUOQ29^tt^2oUO	U2PPP2[UOQ29^tt^2o[OUO
22oUOV12PPP2[OUOQ29^tt^2oUOUO
2U2PPP2[OUOQ29^tt^2oUO	U2PPP2[UOQ29^tt^2o[OUO
22oUOV1]*2PPP2UO[29^tt^2[OUOQ2PPP2[OUO2[OUOQ29^tt^2oUO	U2PPP2[UOQ29^tt^2o[OUO
22oUOV12PPP2P!)%fhCKf9h)%fhCK9h)%fhCK�9h)%fhCK�9h)%fhCKf9h)%fhCK49h)%fhK�9h)%fhP!9h)rcrNrzr�r��rPrrr3rBr�rErCr{r�rr2�rrIrI�	file_datas&   r�test_binary_modes�TestOpen.test_binary_modes�s���r�z��
�Y�Y�t�}�}�d�
+�
+�q�
�G�G�L�!�,�
�$�-�-��
&�
&�!��������1�I����Y�5�'��Y�Y�t�}�}�d�
+�
+�q����Q�V�V�X�|�4�,��Y�Y�t�}�}�d�
+�
+�q�
�G�G�L�!�,�
�$�-�-��
&�
&�!��������1�I����Y�q�(8�9�'��
�
��
/�
/��I�I�d�m�m�T�*�0�������'�
�Y�Y�t�}�}�d�
+�
+�q�
�G�G�L�!�,�
�$�-�-��
&�
&�!��������1�I����Y�5�'�
&�),�
+�
+��
&�
&�
&��,�
+�
+��,�
+�
+��
&�
&�
&��0�
/�
/��,�
+��
&�
&�
&���J&�/5J:�!K�%K"�<K6�>!L
�/L�'5L1�&J7	�/J7	�:K	�K	�K	�K	�"K3	�+K3	�6L	�?L	�
L	�L	�L.	�'L.	�1M	�:M	c�@�[OUO2o[O	UQ29^tt^2oUO[]2*2PPP2UOWOUO2[O	UQ29^tt^2oUO[2PPP2UOUOUO2[O	U29^tt^2oUOUO2[]3*2PPP2UOUOUO2P!)%fhCK9h)%fhK�9h)%fhK_9h)rNr�)
rr[r3rrrBrPrCr]rE)rr3rIs&  r�test_pathlike_file�TestOpen.test_pathlike_file�s����%�%�d�m�m�4��
�Y�Y�x��
&�
&�!�
�G�G�E�B�J��'����������/�
�Y�Y�x��
&�
&�!�
�G�G�E�N�'����������/�
�Y�Y�x�
 �
 �A����Q�V�V�X�u�r�z�2�!����������/�'�
&�
&��'�
&��!�
 �s6�E&�)E:�
,F
�&E7	�/E7	�:F
	�F
	�
F	�F	c��[]2*o[OUOQ29^tt^2oUO	U2PPP2[UOQ29^tt^2o[OUO
22oUOV12PPP2[OUOQ29^tt^2oUOUO
2U2PPP2[OUOQ29^tt^2oUO	U2PPP2[UOQ29^tt^2o[OUO
22oUOV1]*2PPP2UO[29^tt^2[OUOQ2PPP2[OUO2[OUOQ29^tt^2oUO	U2PPP2[UOQ29^tt^2o[OUO
22oUOV12PPP2P!)%fhCKf9h)%fhCK9h)%fhCK�9h)%fhCK�9h)%fhCKf9h)%fhCK49h)%fhK�9h)%fhP!9h)rcr>rzr?rZr�rr s&   r�test_implicit_binary_modes�#TestOpen.test_implicit_binary_modes�s���r�z��
�Y�Y�t�}�}�c�
*�
*�a�
�G�G�L�!�+�
�$�-�-��
&�
&�!��������1�I����Y�5�'��Y�Y�t�}�}�c�
*�
*�a����Q�V�V�X�|�4�+��Y�Y�t�}�}�c�
*�
*�a�
�G�G�L�!�+�
�$�-�-��
&�
&�!��������1�I����Y�q�(8�9�'��
�
��
/�
/��I�I�d�m�m�S�)�0�������'�
�Y�Y�t�}�}�c�
*�
*�a�
�G�G�L�!�+�
�$�-�-��
&�
&�!��������1�I����Y�5�'�
&�)+�
*�
*��
&�
&�
&��+�
*�
*��+�
*�
*��
&�
&�
&��0�
/�
/��+�
*��
&�
&�
&�r$c��[OQ2]2*oUOQ[O2o[
O
UOQQQ59^tt^2oUOU2PPP2[
UOQ29^tt^2o[
OUO22OQ2oUOVB2PPP2[
O
UOQQQ59^tt^2oUOUO2U2PPP2[
O
UOQQQ59^tt^2oUOU2PPP2[
UOQ29^tt^2o[
OUO22OQ2oUOVB]*2PPP2P!)%fhCK�9h)%fhCK/9h)%fhK�9h)%fhK�9h)%fhP!9h)rX�
�wtrYrz�rt�at�rPr[�replacerT�lineseprrr3rBr�rErC�rrI�uncompressed_rawrIr!s&    r�test_text_modes�TestOpen.test_text_modess~���|�|�G�,�r�1��'�/�/��b�j�j�A��
�Y�Y�t�}�}�d�W�Y�
=�
=��
�G�G�L�!�>�
�$�-�-��
&�
&�!��������1�8�8��A�I����Y�9�'��Y�Y�t�}�}�d�W�Y�
=�
=�����Q�V�V�X�|�4�>�
�Y�Y�t�}�}�d�W�Y�
=�
=��
�G�G�L�!�>�
�$�-�-��
&�
&�!��������1�8�8��A�I����Y�1�(<�=�'�
&�>�
=�
=��
&�
&�
&��>�
=��
=�
=��
&�
&�
&�s\�(G6� AH
�!H�)H1�!AI�6H	�?H	�
H	�H	�H.	�'H.	�1I	�:I	�I	�
I	c��[]2*oUOQ2o[OU2o[O	[
OU2Q29^tt^2oUOUO2U2PPP2[O	[
OU2Q29^tt^2oUOUO2U2PPP2[O	[
OU2QQQ59^tt^2oUOUO2U2PPP2P!)%fhK�9h)%fhK�9h)%fhP!9h)rcrXr?rzr.rY)	rPr[rr�rrr�rCrE)r�uncompressed_bytes�uncompressed_strr�rIs&    r�test_fileobj�TestOpen.test_fileobjs���"�R�Z��-�4�4�W�=���]�]�#5�6�
�
�Y�Y�r�z�z�*�-�s�
3�
3�q����Q�V�V�X�'9�:�4�
�Y�Y�r�z�z�*�-�t�
4�
4�����Q�V�V�X�'9�:�5�
�Y�Y�r�z�z�*�-�t�g�Y�
F�
F�!����Q�V�V�X�'7�8�G�
F�	4�
3��
4�
4��
F�
F�
F�s6�'!E
�!E�!E0�
E	�E	�E-	�&E-	�0F	�9F	c�2�UO[29^tt^2[OQ2PPP2UO[29^tt^2[OUO
Q2PPP2UO[29^tt^2[OUO
Q2PPP2UO[29^tt^2[OUO
QQQ5PPP2UO[29^tt^2[OUO
QQQ5PPP2UO[29^tt^2[OUO
QQQ	5PPP2P!)%fhCKw9h)%fhCKE9h)%fhCK9h)%fhK�9h)%fhK�9h)%fhP!9h)
gw��/�^@�wbt�xbtrzzutf-8rY�ignore)�errorsr,)�newline)r{r|rrr�r3rs&r�test_bad_params�TestOpen.test_bad_paramss3��
�
�
�y�
)�
)��I�I�g��*�
�
�
�z�
*�
*��I�I�d�m�m�U�+�+�
�
�
�z�
*�
*��I�I�d�m�m�U�+�+�
�
�
�z�
*�
*��I�I�d�m�m�T�G�I�<�+�
�
�
�z�
*�
*��I�I�d�m�m�T�(�I�;�+�
�
�
�z�
*�
*��I�I�d�m�m�T�4�I�8�+�
*�*�
)�
)��
*�
*�
*��
*�
*�
*��
*�
*��
*�
*��
*�
*�
*�sk�F#�!F7� !G�&#G�.#G2�6#H�#F4	�,F4	�7G	�G	�G	�G	�G/	�(G/	�2H	�;H	�H	�H	c��[OQ2]2*oUOQ[O2o[
O
UOQQQ59^tt^2oUOU2PPP2[
UOQ29^tt^2o[
OUO22OQ2oUOVB2PPP2[
O
UOQQQ59^tt^2oUOUO2U2PPP2P!)%fhK�9h)%fhKx9h)%fhP!9h)rXr,r-zutf-16rYrzr.r0r3s&    r�
test_encoding�TestOpen.test_encoding,s����|�|�G�,�r�1��'�/�/��b�j�j�A��
�Y�Y�t�}�}�d�X�Y�
>�
>�!�
�G�G�L�!�?�
�$�-�-��
&�
&�!��������1�8�8��B�I����Y�9�'��Y�Y�t�}�}�d�X�Y�
>�
>�!����Q�V�V�X�|�4�?�
>�?�
>��
&�
&��?�
>�
>�s7�(E� AE�!E'�E	�
E	�E$	�E$	�'E8	�0E8	c��[OUOQ29^tt^2oUOQ2PPP2[OUOQQQQ59^tt^2oUO	UO2Q2PPP2P!)%fhKf9h)%fhP!9h)rNsfoo�barr.rXr?)rZr@�foobar)rrr3rBrCrErVs& r�test_encoding_error_handler�$TestOpen.test_encoding_error_handler8sz��
�Y�Y�t�}�}�d�
+�
+�q�
�G�G�M�"�,�
�Y�Y�t�}�}�d�W�X�Y�
N�
N�����Q�V�V�X�x�0�O�
N�,�
+��
N�
N�
N�s#�B�/!B-�B*	�#B*	�-B>	�6B>	c���[OQ2]2*o[OUOQQQQ59^tt^2oUOU2PPP2[OUOQQQQ59^tt^2oUO
UO2U,2PPP2P!)%fhKg9h)%fhP!9h)rXr-r,)rZrAr.�
)rPr[rrr3rBrCr�)rrIrIs&  r�test_newline�TestOpen.test_newline@s����|�|�G�,�r�1��
�Y�Y�t�}�}�d�W�d�Y�
K�
K�q�
�G�G�L�!�L�
�Y�Y�t�}�}�d�W�d�Y�
K�
K�q����Q�[�[�]�\�N�;�L�
K�L�
K��
K�
K�
K�s$�	B:�"C
�:C
	�C
	�
C	�C	r)r&r'r(r)r"r&r)r5r:rBrErIrMr*r+r,s@rrr�s7����6�6
0�6�8>� 	9�
9�
5�1�<�<rrc�`�U1QkoU!)c�L:`�[OR2UU1Qk2oU!)c�:�[OR2RU-U@[OR2![OR2h9hr)rT�makedirsr�rmtree)r#�kwargs�	directory�functions*,��r�wrapper�?create_and_remove_directory.<locals>.decorator.<locals>.wrapperKs>����K�K�	�"�
,���0��0�� � ��+��	� � ��+�s	�9�A)�	functools�wraps)rVrWrUsf �r�	decorator�.create_and_remove_directory.<locals>.decoratorJs%���	����	"�	,�
#�	,��rr)rUr[sf r�create_and_remove_directoryr]Is�����rc��`�\sQsQsnQs\2Q2s\\2Q2s	Qs
\2\\2Q22s\\2Q2s\\2Q2s
Q	sQ
sQsUsP!)�TestCommandLineiVsThis is a simple test with gzipc	�j�[O29^tt^2o[OUQQ59^tt^2oUO	UO
2PPP2[OQQQ1o[U[[[Q59^tt^2oUOUO22vqVPPP2PPP2UOWQ2UOWUO
2P!)%fhK�9h)%fhK[9h)%fhKf9h)rNr��-mr�-d��stdin�stdout�stderrr)
rr�rrArBrF�sys�
executablerr�communicaterHrC)r�bytes_io�	gzip_filer#�proc�outr�s&      r�test_decompress_stdin_stdout�,TestCommandLine.test_decompress_stdin_stdoutZs���
�Z�Z�\�\�X����x�d��;�;�y�����	�	�*�<��>�>�4���5�D��t�4��T�B�B�d��+�+�H�,=�,=�,?�@���C��	
����c�"�����d�i�i�(�<�;��C�B���\�sL� D"�C<	�?D"�"D	�<D"�<D
�D
�D"�D
�D
�D"�"D2	�+D2	c�:�[OO[Q2oUO	[OOU22[OUQQ59^tt^2oUOUO2PPP2[QQQU2vq4o[[OO[Q2Q29^tt^2oUOUO2UO2PPP2UOOU22UOU]2UOUQ2UOUQ2P!)%fhK�9h)%fhK�9h)	ztestgzip.gzrN)rGrarrb�testgziprzr)rT�pathr��TEMPDIRr��existsrrrBrFrrCrEr�)r�gzipname�fp�rcrmr��gunzipeds&      r�test_decompress_infile_outfile�.TestCommandLine.test_decompress_infile_outfilegs	���7�7�<�<���7�����������1�2�
�Y�Y�x�d�Y�
+�
+�r��H�H�T�Y�Y��,�'��f�d�H�E����
�"�'�'�,�,�w�
�3�T�
:�
:�h����X�]�]�_�d�i�i�8�;�	
��������x�0�1�����Q������c�"�����c�"�,�
+��;�
:�s$�3E7�+F
�7F	�F	�
F	�F	c��[QQQQ2vqoUOQUO22UOU]2UOUQ2P!)rarrbzthisisatest.outs.filename doesn't end in .gz: 'thisisatest.out'r)r
rC�strip�rrwrmr�s&   r�$test_decompress_infile_outfile_error�4TestCommandLine.test_decompress_infile_outfile_errorxsN��,�T�6�4�AR�S�������J�C�I�I�K�X�����Q������c�"rc�<�[OQQ1o[U[[[Q59^tt^2oUO	UO
2vq4PPP2UO
WQ2UO
WQ*Q2P!)%fhK=9h)rarrcr:Nr�Nr
)rgrhrrrirFrC)rr#rlrmr�s&    r�test_compress_stdin_outfile�+TestCommandLine.test_compress_stdin_outfile~sq���~�~�t�V�+��
�4�t�D��
>�
>�$��'�'��	�	�2�H�C�?�	
����c�"�����R��+�.�	?�
>�s�B�B	�B	c��[OO[Q2oUQ*oUO	[OOU22[
UQ29^tt^2oUOUO2PPP2[QQU2vqEoUO[OOU22UOUQ2UOUQ2P!)%fhKt9h)rq�.gzrNrarr)rTrrr�rsr�rtrrBrFrr�rC)r�local_testgziprurvrwrmr�s&      r�$test_compress_infile_outfile_default�4TestCommandLine.test_compress_infile_outfile_default�s��������g�z�:��!�E�)�����������1�2�
�.�$�
'�
'�2��H�H�T�Y�Y��(�(��f�n�E������������x�0�1�����c�"�����c�"�(�
'�s�1C9�9D		�D		c�(�QFCD`oUOUQ59^tt^2[OO[Q2oUQ*oUO[OO
U22[UQ29^tt^2oUOUO2PPP2[QQV2vqVoUO[OO
U22UOUQ2UOUQ2[OU2UO[OO
U22PPP2CJc	P!)%fhK�9h)%fhCJ�9h)	�--fast)�compress_levelrqr�rNrarr)r��--best)r.rTrrr�rsr�rtrrBrFrr�rC�remove)rr�r�rurvrwrmr�s&       r�test_compress_infile_outfile�,TestCommandLine.test_compress_infile_outfile�s��2�N����^��<�<�!#�����g�z�!B��)�E�1��� � �������!9�:��.�$�/�/�2��H�H�T�Y�Y�'�0� 0��f�n�]������������x� 8�9�� � ��c�*�� � ��c�*��	�	�(�#�� � �������!9�:�=�<�3�0�/��=�<�<�s1�A0E?	�E,
�/B.E?	�,E<�5E<�7E?	�?F
�F
c�r�[QQQQ2vqoUOQU2UOUQ2P!)rarr�r�s8error: argument --best: not allowed with argument --fastr�r
r�rCr}s&   r�%test_compress_fast_best_are_exclusive�5TestCommandLine.test_compress_fast_best_are_exclusive�s6��,�T�6�8�X�N�����
�
�Q�SV�W�����c�"rc�r�[QQQQ2vqoUOQU2UOUQ2P!)rarr�rbsAerror: argument -d/--decompress: not allowed with argument --fastrr�r}s&   r�-test_decompress_cannot_have_flags_compression�=TestCommandLine.test_decompress_cannot_have_flags_compression�s6��,�T�6�8�T�J�����
�
�Z�\_�`�����c�"rr)r&r'r(r)rFrrnr]rsryr~r�r�r�r�r�r*r+r,s@rr_r_Vs�����-�D���
)��
)�!��)�#�*�#� #��� ��)�/�*��/�!��)�#�*�#�!��)�;�*�;�$#�
#�#rr_�__main__)*rurYrrrTrrg�unittest�
subprocessrrr�test.supportrrrrr	r
r�test.support.script_helperrr
�
import_modulerrrPr�rr�abspathr:rsr�r�TestCaser/r<rr]r_r&�mainrrr�<module>r�s��
��	�	�	�
�
��"��3�F�"�=�=�N��"�"�6�*���"�"�6�*��	��	��
�'�'�/�/�)�*�*�
+�h�
6��&�2�:�:�&�(�x� � �(�
1�x�
1�DH<�x�H<�V
� �[#�h�'�'�[#� �[#�|�z���M�M�O�r

Youez - 2016 - github.com/yon3zu
LinuXploit