grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026B vÌÊl¹ÆµÝã@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ú1/opt/alt/python37/lib64/python3.7/_compression.pyÚ_check_not_closed szBaseStream._check_not_closedcCs| ¡st d¡‚dS)NzFile not open for reading)ÚreadableÚioÚUnsupportedOperation)rrrrÚ_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 Úseekable)rrrrÚ_check_can_seeks zBaseStream._check_can_seekN)Ú__name__Ú __module__Ú __qualname__rr rrrrrrr srcsfeZdZdd„Zddd„Z‡fdd„Zdd „Zd d „Zdd d„Zdd„Z e j fdd„Z dd„Z ‡ZS)ÚDecompressReadercCsdS)NTr)rrrrr $szDecompressReader.readablercKs>||_d|_d|_d|_||_||_|jf|jŽ|_||_dS)NFréÿÿÿÿ)Ú_fpÚ_eofÚ_posÚ_sizeÚ_decomp_factoryÚ _decomp_argsÚ _decompressorÚ_trailing_error)rÚfpZdecomp_factoryZtrailing_errorZ decomp_argsrrrÚ__init__'szDecompressReader.__init__csd|_tƒ ¡S)N)rÚsuperÚclose)r)Ú __class__rrr!;szDecompressReader.closecCs |j ¡S)N)rr)rrrrr?szDecompressReader.seekablec CsPt|ƒ�:}| d¡�$}| t|ƒ¡}||dt|ƒ…<WdQRXWdQRXt|ƒS)NÚB)Ú memoryviewÚcastÚreadÚlen)rÚbZviewZ byte_viewÚdatarrrÚreadintoBs$zDecompressReader.readintorcCsî|dkr| ¡S|r|jrdSd}xž|jjr„|jjp>|j t¡}|sFP|jf|j Ž|_y|j  ||¡}Wq¸|j k r€PYq¸Xn4|jj r¦|j t¡}|sªt dƒ‚nd}|j  ||¡}|r$Pq$W|sØd|_|j|_dS|jt|ƒ7_|S)NrózACompressed file ended before the end-of-stream marker was reachedT)ÚreadallrrÚeofZ unused_datarr&Ú BUFFER_SIZErrZ decompressrZ needs_inputÚEOFErrorrrr')rÚsizer)Zrawblockrrrr&Hs>      zDecompressReader.readcCs,|j d¡d|_d|_|jf|jŽ|_dS)NrF)rÚseekrrrrr)rrrrÚ_rewindrs zDecompressReader._rewindcCs¸|tjkr nV|tjkr"|j|}n@|tjkrT|jdkrHx| tj¡rFq8W|j|}ntd  |¡ƒ‚||jkrv|  ¡n ||j8}x0|dkr°| t tj|ƒ¡}|s¢P|t |ƒ8}q‚W|jS)NrzInvalid value for whence: {}) r ÚSEEK_SETÚSEEK_CURrÚSEEK_ENDrr&ÚDEFAULT_BUFFER_SIZErÚformatr2Úminr')rÚoffsetÚwhencer)rrrr1xs&          zDecompressReader.seekcCs|jS)N)r)rrrrÚtell–szDecompressReader.tell)r)r)rrrr rr!rr*r&r2r r3r1r;Ú __classcell__rr)r"rr!s   *r)r r6r.ÚBufferedIOBaserÚ RawIOBaserrrrrÚs