grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026o ®û|jG.ã@s„ gd¢ZdZddlmZddlZddlZddlZddlm Z m Z dZ dZ dZ Gdd „d ejƒZ dd d „Zddd„Zdd„ZdS))ÚBZ2FileÚ BZ2CompressorÚBZ2DecompressorÚopenÚcompressÚ decompressz%Nadeem Vawda é)rN)rrééc@s²eZdZ d)ddœdd„Zdd„Zedd „ƒZd d „Zd d „Zdd„Z dd„Z d*dd„Z d+dd„Z d+dd„Z dd„Zd+dd„Zd+dd„Zd d!„Zd"d#„Zejfd$d%„Zd&d'„Zd(S),rÚré ©Ú compresslevelcCs8 d|_d|_t|_d|krdkstdƒ‚tdƒ‚|dvr%d}t}n1|dvr3d}t}t|ƒ|_n#|d vrAd }t}t|ƒ|_n|d vrOd }t}t|ƒ|_ntd |fƒ‚t |t t t j fƒrlt||ƒ|_d|_||_nt|dƒsvt|dƒr}||_||_ntdƒ‚|jtkr—tj|jttd�}t |¡|_dSd|_dS)NFrr z%compresslevel must be between 1 and 9)Úr Úrbr)ÚwÚwbr)ÚxÚxbr)ÚaÚabrúInvalid mode: %rTÚreadÚwritez6filename must be a str, bytes, file or PathLike object)Ztrailing_errorr)Ú_fpÚ_closefpÚ _MODE_CLOSEDÚ_modeÚ ValueErrorÚ _MODE_READÚ _MODE_WRITErÚ _compressorÚ isinstanceÚstrÚbytesÚosÚPathLikeÚ _builtin_openÚhasattrÚ TypeErrorÚ _compressionZDecompressReaderrÚOSErrorÚioÚBufferedReaderÚ_bufferÚ_pos)ÚselfÚfilenameÚmoder Z mode_codeÚraw©r3ú*/opt/alt/python310/lib64/python3.10/bz2.pyÚ__init__%sLÿ     ÿ zBZ2File.__init__cCs |jtkrdSzQ|jtkr|j ¡n|jtkr%|j |j  ¡¡d|_Wz&|j r>|j ¡Wd|_d|_ t|_d|_dSWd|_d|_ t|_d|_dSd|_d|_ t|_d|_wz$|j rq|j ¡Wd|_d|_ t|_d|_wWd|_d|_ t|_d|_wd|_d|_ t|_d|_w)NF) rrrr-Úcloserrrr Úflushr©r/r3r3r4r6asT    €  ú ýù úýz BZ2File.closecCs |jtkS©N)rrr8r3r3r4Úclosedys zBZ2File.closedcCs | ¡|j ¡Sr9)Ú_check_not_closedrÚfilenor8r3r3r4r<~ó zBZ2File.filenocCs | ¡o |j ¡Sr9)Úreadabler-Úseekabler8r3r3r4r?ƒszBZ2File.seekablecCó | ¡|jtkSr9)r;rrr8r3r3r4r>‡r=zBZ2File.readablecCr@r9)r;rrr8r3r3r4ÚwritableŒr=zBZ2File.writablercCó | ¡|j |¡Sr9)Ú_check_can_readr-Úpeek)r/Únr3r3r4rD‘s z BZ2File.peekéÿÿÿÿcCrBr9)rCr-r©r/Úsizer3r3r4r�s z BZ2File.readcCs$ | ¡|dkr tj}|j |¡S)Nr)rCr+ÚDEFAULT_BUFFER_SIZEr-Úread1rGr3r3r4rJ¦s  z BZ2File.read1cCrBr9)rCr-Úreadinto)r/Úbr3r3r4rK²s zBZ2File.readintocCó: t|tƒst|dƒstdƒ‚| ¡}| ¡|j |¡S©NÚ __index__zInteger argument expected)r!Úintr'r(rOrCr-ÚreadlinerGr3r3r4rQºó   zBZ2File.readlinecCrMrN)r!rPr'r(rOrCr-Ú readlinesrGr3r3r4rSÈrRzBZ2File.readlinescCsZ | ¡t|ttfƒrt|ƒ}nt|ƒ}|j}|j |¡}|j   |¡|j |7_ |Sr9) Z_check_can_writer!r#Ú bytearrayÚlenÚ memoryviewÚnbytesr rrrr.)r/ÚdataZlengthZ compressedr3r3r4rÖs   z BZ2File.writecCs tj ||¡Sr9)r)Ú BaseStreamÚ writelines)r/Úseqr3r3r4rZëszBZ2File.writelinescCs | ¡|j ||¡Sr9)Z_check_can_seekr-Úseek)r/ÚoffsetÚwhencer3r3r4r\õsz BZ2File.seekcCs$ | ¡|jtkr|j ¡S|jSr9)r;rrr-Útellr.r8r3r3r4r_s   z BZ2File.tellN)r )r)rF)Ú__name__Ú __module__Ú __qualname__r5r6Úpropertyr:r<r?r>rArDrrJrKrQrSrrZr+ÚSEEK_SETr\r_r3r3r3r4rs( <      rrr cCs’ d|vrd|vrtd|fƒ‚n|durtdƒ‚|dur!tdƒ‚|dur)tdƒ‚| dd¡}t|||d�}d|vrGt |¡}t ||||¡S|S) NÚtrLrz0Argument 'encoding' not supported in binary modez.Argument 'errors' not supported in binary modez/Argument 'newline' not supported in binary moderr )rÚreplacerr+Ú text_encodingÚ TextIOWrapper)r0r1r ÚencodingÚerrorsÚnewlineZbz_modeZ binary_filer3r3r4rs"ÿ  rcCs t|ƒ}| |¡| ¡Sr9)rrr7)rXr Úcompr3r3r4r9srcCsd g}|r-tƒ}z| |¡}Wn ty|rYn‚w| |¡|js(tdƒ‚|j}|sd |¡S)NzACompressed data ended before the end-of-stream marker was reachedó)rrr*ÚappendÚeofrZ unused_dataÚjoin)rXZresultsZdecompÚresr3r3r4rDs" ü ó r)rr NNN)r )Ú__all__Ú __author__Úbuiltinsrr&r+r$r)Z_bz2rrrrrrYrrrr3r3r3r4Ús$ v ÿ *