관리-도구
편집 파일: gzip.cpython-310.opt-2.pyc
o 6��fYU � @ s d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZg d�Zd\Z Z ZZZ d\ZZdZdZdZdedddfd d �Zdd� ZG d d� d�ZG dd� de�ZG dd� dej�ZG dd� dej�Zefdd�dd�Zdd� Zdd� Zedkre� dS dS )� N)�BadGzipFile�GzipFile�open�compress� decompress)� � � � � )r r r � � �rbc C s� d|v rd|v rt d|f ��n|d urt d��|d ur!t d��|d ur)t d��|�dd�}t| tttjf�r?t| ||�}nt| d�sIt| d �rQtd ||| �}nt d ��d|v rft �|�}t �||||�S |S )N�t�bzInvalid mode: %rz0Argument 'encoding' not supported in binary modez.Argument 'errors' not supported in binary modez/Argument 'newline' not supported in binary mode� �read�writez1filename must be a str or bytes object, or a file) � ValueError�replace� isinstance�str�bytes�os�PathLiker �hasattr� TypeError�io� text_encoding� TextIOWrapper)�filename�mode� compresslevel�encoding�errors�newlineZgz_modeZbinary_file� r&