Qf1 ddlZddlZejZGddejZGddej Zy)Nc&eZdZ dZdZdZdZy) BaseStreamc2|jr tdy)NzI/O operation on closed file)closed ValueErrorselfs 3/opt/alt/python312/lib64/python3.12/_compression.py_check_not_closedzBaseStream._check_not_closed s ;;;< < cN|jstjdy)NzFile not open for reading)readableioUnsupportedOperationrs r _check_can_readzBaseStream._check_can_read"}}))*EF Fr cN|jstjdy)NzFile not open for writing)writablerrrs r _check_can_writezBaseStream._check_can_writerr c|jstjd|jstjdy)Nz3Seeking is only supported on files open for readingz3The underlying file object does not support seeking)rrrseekablers r _check_can_seekzBaseStream._check_can_seeksO}}))+FG G}}))+EF Fr N)__name__ __module__ __qualname__r rrrr r rr s)=GGFr rcreZdZ dZd dZfdZdZdZd dZdZ dZ e jfd Z d ZxZS) DecompressReadercy)NTrrs r rzDecompressReader.readable$sr c ||_d|_d|_d|_||_||_|jdi|j |_||_y)NFrr)_fp_eof_pos_size_decomp_factory _decomp_args _decompressor_trailing_error)r fpdecomp_factorytrailing_error decomp_argss r __init__zDecompressReader.__init__'sZ   .'1T11FD4E4EF .r c.d|_t| SN)r(superclose)r __class__s r r2zDecompressReader.close;s!w}r c6|jjSr0)r"rrs r rzDecompressReader.seekable?sxx  ""r ct|5}|jd5}|jt|}||dt|ddddddtS#1swYxYw#1swYtSxYw)NB) memoryviewcastreadlen)r bview byte_viewdatas r readintozDecompressReader.readintoBsc ]dDIIcNi99S^,D$(Ijs4y !%3]4y%3N]4ys"A.)A"A."A+ 'A..Bc|dkr|jS|r |jryd} |jjry|jjxs|j j t}|sn|jdi|j|_ |jj||}n`|jjr,|j j t}|s tdd}|jj||}|rn|sd|_|j|_y|xjt!|z c_|S#|j$rYLwxYw)Nrr TzACompressed file ended before the end-of-stream marker was reachedr)readallr#r(eof unused_datar"r9 BUFFER_SIZEr&r' decompressr) needs_inputEOFErrorr$r%r:)r sizer>rawblocks r r9zDecompressReader.readHsY !8<<> !tyy!!%% ..::7 HHMM+6%9T%9%9&)''&)"--884HD %%11#xx}}[9H#&(JKK #H))44XtD12DIDJ SY  '++sEE('E(cg}|jtjx}r3|j||jtjx}r3dj |S)Nr )r9sysmaxsizeappendjoin)r chunksr>s r rAzDecompressReader.readallqsXii ,,d, MM$ ii ,,d,xxr c|jjdd|_d|_|jdi|j |_y)NrFr)r"seekr#r$r&r'r(rs r _rewindzDecompressReader._rewind|s>  a  1T11FD4E4EFr c|tjk(rn|tjk(r|j|z}n|tjk(r_|j dkr@|j tjr! |j tjr!|j |z}ntdj|||jkr|jn||jz}|dkDrL|j ttj|}|s |jS|t|z}|dkDrL|jS)NrzInvalid value for whence: {}) rSEEK_SETSEEK_CURr$SEEK_ENDr%r9DEFAULT_BUFFER_SIZErformatrRminr:)r offsetwhencer>s r rQzDecompressReader.seeks R[[  r{{ "YY'F r{{ "zzA~ii 6 67ii 6 67ZZ&(F;BB6JK K DII  LLN dii Fqj99S!7!7@ADyy c$i F qj yyr c |jSr0)r$rs r tellzDecompressReader.tells/yyr )r)r!)rrrrr.r2rr?r9rArRrrTrQr] __classcell__)r3s@r rr!sC?.(# 'R G #%++<r r)rrKrWrDBufferedIOBaser RawIOBaserrr r ras?= $$ F""F0Ar||Ar