grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026o ®û|j1ã@s@ ddlZddlZejZGdd„dejƒZGdd„dejƒZdS)éNc@s.eZdZ dd„Zdd„Zdd„Zdd„Zd S) Ú BaseStreamcCs|jrtdƒ‚dS)NzI/O operation on closed file)ÚclosedÚ ValueError©Úself©rú3/opt/alt/python310/lib64/python3.10/_compression.pyÚ_check_not_closed sÿzBaseStream._check_not_closedcCó| ¡s t d¡‚dS)NzFile not open for reading)ÚreadableÚioÚUnsupportedOperationrrrrÚ_check_can_readó ÿzBaseStream._check_can_readcCr )NzFile not open for writing)Úwritabler r rrrrÚ_check_can_writerzBaseStream._check_can_writecCs(| ¡s t d¡‚| ¡st 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 rrrrrrrr s  rcspeZdZ dd„Zddd„Z‡fdd„Zdd „Zd d „Zdd d„Zdd„Z dd„Z e j fdd„Z dd„Z‡ZS)ÚDecompressReadercCsdS)NTrrrrrr $szDecompressReader.readablercKsB||_d|_d|_d|_||_||_|jdi|j¤Ž|_||_dS)NFréÿÿÿÿr)Ú_fpÚ_eofÚ_posÚ_sizeÚ_decomp_factoryÚ _decomp_argsÚ _decompressorÚ_trailing_error)rÚfpZdecomp_factoryZtrailing_errorZ decomp_argsrrrÚ__init__'s zDecompressReader.__init__csd|_tƒ ¡S©N)rÚsuperÚcloser©Ú __class__rrr%;s zDecompressReader.closecCs |j ¡Sr#)rrrrrrr?s zDecompressReader.seekablec Cs’t|ƒ�9}| d¡�}| t|ƒ¡}||dt|ƒ…<Wdƒn1s$wYWdƒt|ƒSWdƒt|ƒS1s@wYt|ƒS)NÚB)Ú memoryviewÚcastÚreadÚlen)rÚbZviewZ byte_viewÚdatarrrÚreadintoBs(þ ýýzDecompressReader.readintorcCsê|dkr| ¡S|r |jrdSd} |jjrA|jjp|j t¡}|s#n<|jdi|j ¤Ž|_z |j  ||¡}Wn$|j y@Ynw|jj rR|j t¡}|sQt dƒ‚nd}|j  ||¡}|r^nq|sjd|_|j|_dS|jt|ƒ7_|S)NróTzACompressed file ended before the end-of-stream marker was reachedr)ÚreadallrrÚeofZ unused_datarr+Ú BUFFER_SIZErrÚ decompressr Z needs_inputÚEOFErrorrrr,)rÚsizer.Zrawblockrrrr+HsH  ÿÿþ ÿèzDecompressReader.readcCs8g}| tj¡}r| |¡| tj¡}s d |¡S)Nr0)r+ÚsysÚmaxsizeÚappendÚjoin)rZchunksr.rrrr1qs  ÿ zDecompressReader.readallcCs0|j d¡d|_d|_|jdi|j¤Ž|_dS)NrFr)rÚseekrrrrrrrrrÚ_rewind|s zDecompressReader._rewindcCsÈ|tjkrn/|tjkr|j|}n$|tjkr.|jdkr(| tj¡r( | tj¡s!|j|}ntd  |¡ƒ‚||jkr?|  ¡n||j8}|dkra| t tj|ƒ¡}|sW |jS|t |ƒ8}|dksH|jS)NrzInvalid value for whence: {}) r ÚSEEK_SETÚSEEK_CURrÚSEEK_ENDrr+ÚDEFAULT_BUFFER_SIZErÚformatr<Úminr,)rÚoffsetÚwhencer.rrrr;‚s,       ÿ     þüzDecompressReader.seekcCs |jSr#)rrrrrÚtell szDecompressReader.tell)r)r)rrrr r"r%rr/r+r1r<r r=r;rEÚ __classcell__rrr&rr!s   ) r)r r7r@r3ÚBufferedIOBaserÚ RawIOBaserrrrrÚs