grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026a ´iÜã@s6ddlZejZGdd„dejƒZGdd„dejƒZdS)éNc@s,eZdZdd„Zdd„Zdd„Zdd„Zd S) Ú BaseStreamcCs|jrtdƒ‚dS)NzI/O operation on closed file)ÚclosedÚ ValueError©Úself©rú$/usr/lib64/python3.9/_compression.pyÚ_check_not_closed szBaseStream._check_not_closedcCs| ¡st d¡‚dS)NzFile not open for reading)ÚreadableÚioÚUnsupportedOperationrrrrÚ_check_can_readszBaseStream._check_can_readcCs| ¡st d¡‚dS)NzFile not open for writing)Úwritabler r rrrrÚ_check_can_writeszBaseStream._check_can_writecCs(| ¡st d¡‚| ¡s$t d¡‚dS)Nz3Seeking is only supported on files open for readingz3The underlying file object does not support seeking)r r r ÚseekablerrrrÚ_check_can_seeks zBaseStream._check_can_seekN)Ú__name__Ú __module__Ú __qualname__r r rrrrrrr srcsfeZdZdd„Zddd„Z‡fdd„Zdd „Zd d „Zdd d„Zdd„Z e j fdd„Z dd„Z ‡ZS)ÚDecompressReadercCsdS)NTrrrrrr $szDecompressReader.readablercKsB||_d|_d|_d|_||_||_|jfi|j¤Ž|_||_dS)NFréÿÿÿÿ)Ú_fpÚ_eofÚ_posÚ_sizeÚ_decomp_factoryÚ _decomp_argsÚ _decompressorÚ_trailing_error)rÚfpÚdecomp_factoryÚtrailing_errorÚ decomp_argsrrrÚ__init__'szDecompressReader.__init__csd|_tƒ ¡S©N)rÚsuperÚcloser©Ú __class__rrr&;szDecompressReader.closecCs |j ¡Sr$)rrrrrrr?szDecompressReader.seekablec Csxt|ƒ�X}| d¡�.}| t|ƒ¡}||dt|ƒ…<Wdƒn1sH0YWdƒn1sf0Yt|ƒS)NÚB)Ú memoryviewÚcastÚreadÚlen)rÚbÚviewÚ byte_viewÚdatarrrÚreadintoBsLzDecompressReader.readintorcCsî|dkr| ¡S|r|jrdSd}|jjr†|jjp<|j t¡}|sDqÂ|jfi|j ¤Ž|_z|j  ||¡}Wqº|j y‚YqÂYqº0n4|jj r¨|j t¡}|s¬t dƒ‚nd}|j  ||¡}|r"qÂq"|sØd|_|j|_dS|jt|ƒ7_|S)NrózACompressed file ended before the end-of-stream marker was reachedT)ÚreadallrrÚeofÚ unused_datarr,Ú BUFFER_SIZErrÚ decompressrÚ needs_inputÚEOFErrorrrr-)rÚsizer1Úrawblockrrrr,Hs@  ÿÿ   zDecompressReader.readcCs0|j d¡d|_d|_|jfi|j¤Ž|_dS)NrF)rÚseekrrrrrrrrrÚ_rewindrs zDecompressReader._rewindcCs°|tjkr nR|tjkr"|j|}n<|tjkrP|jdkrD| tj¡rDq6|j|}ntd  |¡ƒ‚||jkrr|  ¡n ||j8}|dkrª| t tj|ƒ¡}|sœqª|t |ƒ8}q||jS)NrzInvalid value for whence: {}) r ÚSEEK_SETÚSEEK_CURrÚSEEK_ENDrr,ÚDEFAULT_BUFFER_SIZErÚformatr>Úminr-)rÚoffsetÚwhencer1rrrr=xs&          zDecompressReader.seekcCs|jSr$)rrrrrÚtell–szDecompressReader.tell)r)r)rrrr r#r&rr2r,r>r r?r=rGÚ __classcell__rrr'rr!s   *r)r rBr7ÚBufferedIOBaserÚ RawIOBaserrrrrÚs