관리-도구
편집 파일: lzma.cpython-37.opt-2.pyc
B YI~d�2 � $ @ s� d ddddddddd d ddd ddddddddddddddddddd d!d"d#g$Z d$d%lZd$d%lZd$d%lZd$d&lT d$d'lmZmZ d$d%lZd$Zd(Z d)Z G d*d� dej�Zd1d%d,d%d%d%d%d%d-�d.d �Z ed,d%d%fd/d!�Zed%d%fd0d"�Zd%S )2Z CHECK_NONEZCHECK_CRC32ZCHECK_CRC64ZCHECK_SHA256ZCHECK_ID_MAXZ CHECK_UNKNOWNZFILTER_LZMA1ZFILTER_LZMA2ZFILTER_DELTAZ FILTER_X86ZFILTER_IA64Z FILTER_ARMZFILTER_ARMTHUMBZFILTER_POWERPCZFILTER_SPARC�FORMAT_AUTO� FORMAT_XZZFORMAT_ALONEZ FORMAT_RAWZMF_HC3ZMF_HC4ZMF_BT2ZMF_BT3ZMF_BT4Z MODE_FASTZMODE_NORMALZPRESET_DEFAULTZPRESET_EXTREME�LZMACompressor�LZMADecompressor�LZMAFile� LZMAError�open�compress� decompressZis_check_supported� N)�*)�_encode_filter_properties�_decode_filter_properties� � c @ s� e Zd Zd!ddddd�dd�Zdd� Zed d � �Zdd� Zd d� Zdd� Z dd� Z d"dd�Zd#dd�Zd$dd�Z d%dd�Zdd� Zejfdd�Zdd � ZdS )&r N�r���)�format�check�preset�filtersc C s& d | _ d| _t| _|dkrL|dkr*td��|d k r:td��|d krFt}t}n@|dkr~|d kr`t}t}t ||||d�| _ d| _ntd �|���t |tttjf�r�d |kr�|d 7 }t�||�| _ d| _|| _n*t|d�s�t|d �r�|| _ || _ntd��| jtk�r"tj| j tt||d�}t�|�| _d S )NF)r �rbr zACannot specify an integrity check when opening a file for readingzICannot specify a preset compression level when opening a file for reading)�w�wb�aZab�xZxb)r r r r r zInvalid mode: {!r}�bT�read�writez6filename must be a str, bytes, file or PathLike object)Ztrailing_errorr r )�_fp�_closefp�_MODE_CLOSED�_mode� ValueErrorr � _MODE_READr �_MODE_WRITEr �_compressor�_posr � isinstance�str�bytes�os�PathLike�builtinsr �hasattr� TypeError�_compressionZDecompressReaderr r �io�BufferedReader�_buffer) �self�filename�moder r r r Z mode_code�raw� r7 �)/opt/alt/python37/lib64/python3.7/lzma.py�__init__1 sB , zLZMAFile.__init__c C s� | j tkrd S zB| j tkr,| j�� d | _n"| j tkrN| j�| j� � � d | _W d z| j rd| j�� W d d | _d| _ t| _ X X d S )NF)r! r r# r2 �closer$ r r r% �flushr )r3 r7 r7 r8 r: � s zLZMAFile.closec C s | j tkS )N)r! r )r3 r7 r7 r8 �closed� s zLZMAFile.closedc C s | � � | j�� S )N)�_check_not_closedr �fileno)r3 r7 r7 r8 r>