3 \Ü ã @ s6 d dl Z e jZG dd„ de jƒZG dd„ de jƒZdS )é Nc @ s, e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd S ) Ú BaseStreamc C s | j rtdƒ‚d S )NzI/O operation on closed file)ÚclosedÚ ValueError)Úself© r ú$/usr/lib64/python3.6/_compression.pyÚ_check_not_closed s zBaseStream._check_not_closedc C s | j ƒ stjdƒ‚d S )NzFile not open for reading)ÚreadableÚioÚUnsupportedOperation)r r r r Ú_check_can_read s zBaseStream._check_can_readc C s | j ƒ stjdƒ‚d S )NzFile not open for writing)Úwritabler r )r r r r Ú_check_can_write s zBaseStream._check_can_writec C s( | j ƒ stjdƒ‚| jƒ s$tjdƒ‚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 zBaseStream._check_can_seekN)Ú__name__Ú __module__Ú__qualname__r r r r r r r r r s r c sh e Zd Zdd„ Zf fdd„Z‡ fdd„Zdd„ Zd d „ Zddd „Zdd„ Z e jfdd„Zdd„ Z ‡ ZS )ÚDecompressReaderc C s dS )NTr )r r r r r $ s zDecompressReader.readablec K s> || _ d| _d| _d| _|| _|| _| jf | jŽ| _|| _d S )NFr é éÿÿÿÿ)Ú_fpÚ_eofÚ_posÚ_sizeÚ_decomp_factoryÚ_decomp_argsÚ _decompressorÚ_trailing_error)r ÚfpZdecomp_factoryZtrailing_errorZdecomp_argsr r r Ú__init__' s zDecompressReader.__init__c s d | _ tƒ jƒ S )N)r ÚsuperÚclose)r )Ú __class__r r r" ; s zDecompressReader.closec C s | j jƒ S )N)r r )r r r r r ? s zDecompressReader.seekablec C sP t |ƒ�:}|jdƒ�$}| jt|ƒƒ}||d t|ƒ…<