Server IP : 85.214.239.14 / Your IP : 216.73.216.169 Web Server : Apache/2.4.65 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 8.2.29 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/2/cwd/proc/2/root/proc/3/root/usr/lib/python3.5/__pycache__/ |
Upload File : |
F��a��@sQdZddlZejZGdd�dej�ZGdd�dej�ZdS)z7Internal classes used by the gzip, lzma and bz2 modules�Nc@sFeZdZdZdd�Zdd�Zdd�Zdd �Zd S)� BaseStreamzMode-checking helper functions.cCs|jrtd��dS)NzI/O operation on closed file)�closed� ValueError)�self�r�"/usr/lib/python3.5/_compression.py�_check_not_closeds zBaseStream._check_not_closedcCs|j�stjd��dS)NzFile not open for reading)�readable�io�UnsupportedOperation)rrrr�_check_can_readszBaseStream._check_can_readcCs|j�stjd��dS)NzFile not open for writing)�writabler r)rrrr�_check_can_writeszBaseStream._check_can_writecCs:|j�stjd��|j�s6tjd��dS)Nz3Seeking is only supported on files open for readingz3The underlying file object does not support seeking)r r r�seekable)rrrr�_check_can_seekszBaseStream._check_can_seekN)�__name__� __module__�__qualname__�__doc__rrrrrrrrr s rcs�eZdZdZdd�Zfdd�Z�fdd�Zdd �Zd d�Zdd d�Z dd�Z ejdd�Z dd�Z�S)�DecompressReaderz5Adapts the decompressor API to a RawIOBase reader APIcCsdS)NTr)rrrrr $szDecompressReader.readablecKsX||_d|_d|_d|_||_||_|j|j�|_||_dS)NFr����)�_fp�_eof�_pos�_size�_decomp_factory�_decomp_args� _decompressor�_trailing_error)r�fpZdecomp_factoryZtrailing_errorZdecomp_argsrrr�__init__'s zDecompressReader.__init__csd|_t�j�S)N)r�super�close)r)� __class__rrr#;s zDecompressReader.closecCs |jj�S)N)rr)rrrrr?szDecompressReader.seekablecCsdt|��K}|jd��2}|jt|��}||dt|��<WdQRXWdQRXt|�S)N�B)� memoryview�cast�read�len)r�bZviewZ byte_view�datarrr�readintoBs!$zDecompressReader.readintorcCs?|dkr|j�S|s&|jr*dSd}x�|jjr�|jjpZ|jjt�}|sdP|j|j �|_y|jj ||�}Wq�|jk r�PYq�XnN|jjr�|jjt�}|s�t d��nd}|jj ||�}|r3Pq3W|s&d|_|j|_dS|jt|�7_|S)Nr�zACompressed file ended before the end-of-stream marker was reachedT)�readallrrZeofZunused_datarr(�BUFFER_SIZErrZ decompressrZneeds_input�EOFErrorrrr))r�sizer+Zrawblockrrrr(Hs> zDecompressReader.readcCs;|jjd�d|_d|_|j|j�|_dS)NrF)r�seekrrrrr)rrrr�_rewindrs zDecompressReader._rewindcCs|tjkrn{|tjkr1|j|}n\|tjkrx|jdkrhx|jtj�rgqRW|j|}ntdj |���||jkr�|j �n ||j8}xB|dkr�|jttj|��}|s�P|t|�8}q�W|jS)NrzInvalid value for whence: {}) r �SEEK_SET�SEEK_CURr�SEEK_ENDrr(�DEFAULT_BUFFER_SIZEr�formatr3�minr))r�offset�whencer+rrrr2xs& zDecompressReader.seekcCs|jS)z!Return the current file position.)r)rrrr�tell�szDecompressReader.tellr)rrrrr r!r#rr,r(r3r r4r2r<rr)r$rr!s*r)rr r7r/�BufferedIOBaser� RawIOBaserrrrr�<module>s