![]() Server : Apache/2.4.52 (Ubuntu) System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64 User : www-data ( 33) PHP Version : 8.1.2-1ubuntu2.21 Disable Function : NONE Directory : /lib/python3/dist-packages/twisted/python/__pycache__/ |
o �b�% � @ s� d Z ddlZddlZddlZddlZG dd� dej�ZG dd� d�ZG dd� de�Z G d d � d e�Z dZdd � Zdd� Z ddd�ZdS )z� An incremental approach to unzipping files. This allows you to unzip a little bit of a file at a time, which means you can report progress as a file unzips. � Nc @ s e Zd ZdZdd� ZdS )�ChunkingZipFilez~ A L{zipfile.ZipFile} object which, with L{readfile}, also gives you access to a file-like object for each entry. c C s" | j dvr td��| jstd��| �|�}| j�|jd� | j�tj�}|dd� tj kr2t� d��t�tj |�}| j�|tj �}|tj rP| j�|tj � |jd@ r[|�d�}n|�d �}||jkrot� d |j|f ��|jtjkr{t| |j�S |jtjkr�t| |j�S t� d|j|f ��)z3 Return file-like object for name. )�r�azread() requires mode "r" or "a"z3Attempt to read ZIP archive that was already closedr � z Bad magic number for file headeri zutf-8�cp437z3File name in directory "%s" and header "%s" differ.z-Unsupported compression method %d for file %s)�mode�RuntimeError�fp�getinfo�seek� header_offset�read�zipfile�sizeFileHeader�stringFileHeader� BadZipfile�struct�unpack�structFileHeader�_FH_FILENAME_LENGTH�_FH_EXTRA_FIELD_LENGTH� flag_bits�decode� orig_filename� compress_type� ZIP_STORED�ZipFileEntry� compress_size�ZIP_DEFLATED�DeflatedZipFileEntry)�self�name�zinfo�fheader�fname� fname_str� r&