H5" t d Z ddlZddlZej Z G d dej Z G d dej ZdS )z7Internal classes used by the gzip, lzma and bz2 modules Nc * e Zd ZdZd Zd Zd Zd ZdS ) BaseStreamzMode-checking helper functions.c 2 | j rt d d S )NzI/O operation on closed file)closed ValueErrorselfs 9/opt/alt/python-internal/lib64/python3.11/_compression.py_check_not_closedzBaseStream._check_not_closed s% ; =;<<< = = c V | st j d d S )NzFile not open for reading)readableioUnsupportedOperationr s r _check_can_readzBaseStream._check_can_read 1 }} G)*EFFF G Gr c V | st j d d S )NzFile not open for writing)writabler r r s r _check_can_writezBaseStream._check_can_write r r c | st j d | st j d d S )Nz3Seeking is only supported on files open for readingz3The underlying file object does not support seeking)r r r seekabler s r _check_can_seekzBaseStream._check_can_seek sl }} G) +F G G G}} F) +E F F F F Fr N)__name__ __module____qualname____doc__r r r r r r r r sa ))= = =G G GG G GF F F F Fr r c j e Zd ZdZd ZddZ fdZd Zd Zdd Z d Z d Zej fdZd Z xZS )DecompressReaderz5Adapts the decompressor API to a RawIOBase reader APIc dS )NTr r s r r zDecompressReader.readable$ s tr r c || _ d| _ d| _ d| _ || _ || _ | j di | j | _ || _ d S )NFr r )_fp_eof_pos_size_decomp_factory_decomp_args _decompressor_trailing_error)r fpdecomp_factorytrailing_errordecomp_argss r __init__zDecompressReader.__init__' s` .'1T1FFD4EFF .r c R d | _ t S N)r) superclose)r __class__s r r3 zDecompressReader.close; s !ww}}r c 4 | j S r1 )r# r r s r r zDecompressReader.seekable? s x """r c 4 t | 5 }| d 5 }| t | }||d t | <