<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>

]                 @   sK   d  d l  Z  e  j Z Gd d   d e  j  Z Gd d   d e  j  Z d S)    Nc               @   s@   e  Z d  Z d d   Z d d   Z d d   Z d d   Z d	 S)

BaseStreamc             C   s   |  j  r t d   d  S)NzI/O operation on closed file)closed
ValueError)self r   1/opt/alt/python35/lib64/python3.5/_compression.py_check_not_closed   s    	zBaseStream._check_not_closedc             C   s   |  j    s t j d   d  S)NzFile not open for reading)readableioUnsupportedOperation)r   r   r   r   _check_can_read   s    zBaseStream._check_can_readc             C   s   |  j    s t j d   d  S)NzFile not open for writing)writabler
   r   )r   r   r   r   _check_can_write   s    zBaseStream._check_can_writec             C   s:   |  j    s t j d   |  j   s6 t j d   d  S)Nz3Seeking is only supported on files open for readingz3The underlying file object does not support seeking)r	   r
   r   seekable)r   r   r   r   _check_can_seek   s    zBaseStream._check_can_seekN)__name__
__module____qualname__r   r   r   r   r   r   r   r   r   	   s   r   c                   s   e  Z d  Z d d   Z f  d d  Z   f d d   Z d d   Z d	 d
   Z d d d  Z d d   Z	 e
 j d d  Z d d   Z   S)DecompressReaderc             C   s   d S)NTr   )r   r   r   r   r	   $   s    zDecompressReader.readablec             K   sX   | |  _  d |  _ d |  _ d |  _ | |  _ | |  _ |  j |  j   |  _ | |  _ d  S)NFr      )_fp_eof_pos_size_decomp_factory_decomp_args_decompressor_trailing_error)r   fpdecomp_factorytrailing_errordecomp_argsr   r   r   __init__'   s    						zDecompressReader.__init__c                s   d  |  _  t   j   S)N)r   superclose)r   )	__class__r   r   r%   ;   s    	zDecompressReader.closec             C   s   |  j  j   S)N)r   r   )r   r   r   r   r   ?   s    zDecompressReader.seekablec             C   sd   t  |  K } | j d  2 } |  j t |   } | | d  t |   <Wd  QRXWd  QRXt |  S)NB)
memoryviewcastreadlen)r   bview	byte_viewdatar   r   r   readintoB   s    !$zDecompressReader.readintor   c             C   s?  | d k  r |  j    S| s& |  j r* d Sd  } x |  j j r |  j j pZ |  j j t  } | sd P|  j |  j	   |  _ y |  j j
 | |  } Wq |  j k
 r PYq XnN |  j j r |  j j t  } | s t d   n d } |  j j
 | |  } | r3 Pq3 W| s&d |  _ |  j |  _ d S|  j t |  7_ | S)Nr       zACompressed file ended before the end-of-stream marker was reachedT)readallr   r   eofunused_datar   r*   BUFFER_SIZEr   r   
decompressr   needs_inputEOFErrorr   r   r+   )r   sizer/   rawblockr   r   r   r*   H   s>    
		zDecompressReader.readc             C   s;   |  j  j d  d |  _ d |  _ |  j |  j   |  _ d  S)Nr   F)r   seekr   r   r   r   r   )r   r   r   r   _rewindr   s    		zDecompressReader._rewindc             C   s  | t  j k r n{ | t  j k r1 |  j | } n\ | t  j k rx |  j d k  rh x |  j t  j  rg qR W|  j | } n t d j	 |    | |  j k  r |  j
   n | |  j 8} xB | d k r |  j t t  j |   } | s P| t |  8} q W|  j S)Nr   zInvalid value for whence: {})r
   SEEK_SETSEEK_CURr   SEEK_ENDr   r*   DEFAULT_BUFFER_SIZEr   formatr<   minr+   )r   offsetwhencer/   r   r   r   r;   x   s&    zDecompressReader.seekc             C   s   |  j  S)N)r   )r   r   r   r   tell   s    zDecompressReader.tellr   )r   r   r   r	   r#   r%   r   r0   r*   r<   r
   r=   r;   rE   r   r   )r&   r   r   !   s   *r   )r
   r@   r5   BufferedIOBaser   	RawIOBaser   r   r   r   r   <module>   s   	