grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026a XC?h Uã@süddlZddlZddlZddlZddlZddlZddlZddlZgd¢Zd\Z Z Z Z Z d\ZZdZdZdZdedddfd d „Zd d „ZGd d„dƒZGdd„deƒZGdd„dejƒZGdd„dejƒZefddœdd„Zdd„Zdd„ZedkrøeƒdS)éN)Ú BadGzipFileÚGzipFileÚopenÚcompressÚ decompress)ééééé)rrréé ÚrbcCsÈd|vr d|vrPtd|fƒ‚n0|dur0tdƒ‚|dur@tdƒ‚|durPtdƒ‚| dd¡}t|tttjfƒr|t|||ƒ}n,t|dƒs�t|d ƒr td|||ƒ}nt d ƒ‚d|vrÀt   ||||¡S|SdS) NÚtÚbzInvalid mode: %rz0Argument '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Ú TextIOWrapper)ÚfilenameÚmodeÚ compresslevelÚencodingÚerrorsÚnewlineZgz_modeZ binary_file©r%ú)/opt/alt/python39/lib64/python3.9/gzip.pyrs$ rcCs| t d|¡¡dS)Nz|jdur||_n|jt|ƒ8_dSt|jƒ|_d|_dSr-)r2r.r/r0)r3r5r%r%r&r5bs   z_PaddedFile.prependcCsd|_d|_|j |¡Sr7)r2r.r1Úseek)r3Zoffr%r%r&r9ksz_PaddedFile.seekcCsdS©NTr%©r3r%r%r&Úseekablepsz_PaddedFile.seekableN)r,)r,)Ú__name__Ú __module__Ú __qualname__r6rr5r9r<r%r%r%r&r+Js   r+c@s eZdZdS)rN)r=r>r?r%r%r%r&rtsrc@sÚeZdZdZddeddfdd„Zedd„ƒZedd„ƒZdd „Z d d „Z d d „Z dd„Z d+dd„Z d,dd„Zdd„Zedd„ƒZdd„Zejfdd„Zdd„Zdd „Zd!d"„Zd#d$„Zd%d&„Zejfd'd(„Zd-d)d*„ZdS).rNc CsV|r"d|vsd|vr"td |¡ƒ‚|r6d|vr6|d7}|durTt ||pJd¡}|_|dur|t|ddƒ}t|ttfƒs†d}n t   |¡}|}|duržt|ddƒ}|  d ¡rÊt |_ t|ƒ}t |¡|_||_nl|  d ¡�r(|durôd dl}| d td ¡t|_ | |¡t |tjtj tjd ¡|_||_ntd |¡ƒ‚||_|j tk�rR|  |¡dS)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)!rÚformatÚbuiltinsrÚ myfileobjÚgetattrrrrrÚfspathÚ startswithÚREADr Ú _GzipReaderrÚBufferedReaderr.rAÚwarningsÚwarnÚ FutureWarningÚWRITEÚ _init_writeÚzlibZ compressobjZDEFLATEDÚ MAX_WBITSZ DEF_MEM_LEVELrÚ _write_mtimeÚfileobjÚ_write_gzip_header) r3rr r!rWÚmtimeZorigmodeÚrawrOr%r%r&r6…sN#       ü ü zGzipFile.__init__cCsBddl}| dtd¡|jtkr<|jdd…dkr<|jdS|jS)Nrzuse the name attributeréýÿÿÿú.gz)rOrPÚDeprecationWarningr rRrA)r3rOr%r%r&rÖs  zGzipFile.filenamecCs |jjjSr7)r.rZÚ _last_mtimer;r%r%r&rYÞszGzipFile.mtimecCs.t|jƒ}d|dd…dtt|ƒƒdS)Nz)ÚreprrWÚhexÚid)r3Úsr%r%r&Ú__repr__ãs zGzipFile.__repr__cCs.||_t d¡|_d|_g|_d|_d|_dS©Nr,r)rArTÚcrc32Úcrcr8ZwritebufÚbufsizeÚoffset)r3rr%r%r&rSçs  zGzipFile._init_writecCs|j d¡|j d¡zr?rHr{r6ÚpropertyrrYrfrSrXrrr‡rˆr‹rŽrTZ Z_SYNC_FLUSHr�r�r�r‘r’r<rr”r9r›r%r%r%r&rxs4 ÿ Q      rcsZeZdZ‡fdd„Zdd„Zdd„Zdd„Zdd d „Zd d „Zdd„Z ‡fdd„Z ‡Z S)rMcs,tƒjt|ƒtjtj d�d|_d|_dS)N)ZwbitsT)Úsuperr6r+rTZ decompressobjrUÚ _new_memberr^)r3Úfp©Ú __class__r%r&r6’s ÿz_GzipReader.__init__cCst d¡|_d|_dSrg)rTrhÚ_crcÚ _stream_sizer;r%r%r&Ú _init_read™s z_GzipReader._init_readcCsF|j |¡}t|ƒ|krB|j |t|ƒ¡}|s8tdƒ‚||7}q |S)NúACompressed file ended before the end-of-stream marker was reached)Ú_fprr/ÚEOFError)r3r‰r„rr%r%r&Ú _read_exact�s   z_GzipReader._read_exactcCsÚ|j d¡}|dkrdS|dkr,td|ƒ‚t d| d¡¡\}}|_|dkrVtdƒ‚|t@r|t d | d¡¡\}| |¡|t@r |j d ¡}|r |d kr„q q„|t @rÄ|j d ¡}|rÄ|d kr¨qÄq¨|t @rÖ| d¡d S) Nrr,FrlzNot a gzipped file (%r)zr?r6r¤r¨r°rr´r³r·Ú __classcell__r%r%r r&rM‘s ! 3rM)rYcCsJt ¡}t|d||d��}| |¡Wdƒn1s80Y| ¡S)NÚwb)rWr r!rY)rÚBytesIOrrÚgetvalue)r„r!rYrµr4r%r%r&rs(rcCs<tt |¡d��}| ¡WdƒS1s.0YdS)NrŠ)rrrºr)r„r4r%r%r&r'src CsŽddlm}|dd�}| ¡}|jdddd�|jd dd d�|jd d dd d�|jdddgdd�| ¡}t}|jr|t}n |jr†t }|j D]ü}|j rú|dkrºt ddt jjd�}t jj}n>|dd…dkrÚt  d|›�¡t|dƒ}t |dd…d¡}nB|dk�r"t jj}t ddt jj|d�}nt |d¡}t|ddƒ}| d¡}|�sP�q^| |¡�q<|t jju�rt| ¡|t jjurŒ| ¡qŒdS)Nr)ÚArgumentParserzeA simple command line interface for the gzip module: act like gzip, but do not delete the input file.)Z descriptionz--fastÚ store_truezcompress faster)ÚactionÚhelpz--bestzcompress betterz-dz --decompresszact like gunzip instead of gzipÚargsÚ*ú-r1)ÚnargsÚdefaultÚmetavarrr)rr rWr[r\zfilename doesn't end in .gz: r¹)rr rWr!r“)Úargparser¼Zadd_mutually_exclusive_groupÚ add_argumentÚ parse_argsÚ_COMPRESS_LEVEL_TRADEOFFZfastr|Zbestr{rÀrrÚsysÚstdinÚbufferÚstdoutÚexitrrGrrrŽ) r¼ÚparserÚgrouprÀr!Úargr4Úgr™r%r%r&Úmain/sR ÿ ÿ     ÿ   rÓÚ__main__) r'rÊryrrTrGrZ _compressionÚ__all__ZFTEXTr¬rªrwr«rLrRr|rÉr{rr*r+r€rZ BaseStreamrZDecompressReaderrMrrrÓr=r%r%r%r&Ús4 ÿ ,* 0