AlkantarClanX12
Current Path : /proc/self/root/usr/lib64/python3.6/__pycache__/ |
Current File : //proc/self/root/usr/lib64/python3.6/__pycache__/bz2.cpython-36.opt-2.pyc |
3 \�0 � @ s� d dddddgZ dZddlmZ dd lZdd lZdd lZdd lZydd l m Z W n ek rp dd lm Z Y nX ddl mZmZ dZdZd ZG dd � d ej�Zddd�Zddd�Zdd� Zd S )�BZ2File� BZ2Compressor�BZ2Decompressor�open�compress� decompressz%Nadeem Vawda <nadeem.vawda@gmail.com>� )r N)�RLock)r r � � c @ s� e Zd Zd(dd�Zdd� Zedd � �Zd d� Zdd � Zdd� Z dd� Z d)dd�Zd+dd�Zd-dd�Z dd� Zd/dd�Zd1dd�Zd d!� Zd"d#� Zejfd$d%�Zd&d'� ZdS )2r �rN� c C sT t � | _d | _d| _t| _|d k r.tjdt� d| ko@dkn sNt d��|dkr`d}t }nb|dkr|d }t}t|�| _ nF|dkr�d}t}t|�| _ n*|dkr�d}t}t|�| _ nt d|f ��t|tttjf�� r�t||�| _d| _|| _n.t|d��st|d��r|| _|| _ntd��| jt k�rJtj| jttd�}tj|�| _nd| _d S )NFz)Use of 'buffering' argument is deprecatedr r z%compresslevel must be between 1 and 9� r �rb�w�wb�x�xb�a�abzInvalid mode: %rT�read�writez6filename must be a str, bytes, file or PathLike object)Ztrailing_errorr )r r r )r r )r r )r r )r �_lock�_fp�_closefp�_MODE_CLOSED�_mode�warnings�warn�DeprecationWarning� ValueError� _MODE_READ�_MODE_WRITEr �_compressor� isinstance�str�bytes�os�PathLike� _builtin_open�hasattr� TypeError�_compressionZDecompressReaderr �OSError�io�BufferedReader�_buffer�_pos)�self�filename�mode� buffering� compresslevelZ mode_code�raw� r7 �/usr/lib64/python3.6/bz2.py�__init__+ sL zBZ2File.__init__c C s� | j �� | jtkrd S z<| jtkr.| jj� n"| jtkrP| jj| j j � � d | _ W d z| jrf| jj� W d d | _d| _t| _d | _X X W d Q R X d S )NF)r r r r r/ �closer! r r r"