U e5d°Vã@sdZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZddlZzddlZejZWnek r¤dZejZYnXz ddlZWnek rÊdZYnXz ddlZWnek rðdZYnXddddddd d d d d ddg ZGdd„deƒZGdd„deƒZeZZdZdZdZdZdZdZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(e  )e'¡Z*dZ+dZ,dZ-dZ.d Z/d!Z0d"Z1d#Z2dZ3d$Z4d%Z5d&Z6e  )e5¡Z7dZ8dZ9dZ:dZ;d Zd#Z?dZ@d$ZAd'ZBd(ZCdZDd)ZEdZFd*ZGd+ZHd,ZId-ZJd.ZKd/ZLe  )eK¡ZMdZNdZOdZPdZQd ZRd!ZSd"ZTd#ZUdZVd$ZWd'ZXd(ZYd0ZZd1Z[e  )eZ¡Z\d2Z]d3Z^e  )e]¡Z_dZ`dZadZbdZcd Zdd!Zed"Zfd#ZgdZhd$Zid4Zje  kd5¡Zld6d7„Zmd8d9„Znd:d „Zod;d<„Zpd=d>„ZqGd?d „d erƒZsdatd@dA„ZudBdC„ZvGdDdE„dEƒZwGdFdG„dGƒZxdHdIdJdJdJdJdKdLdMdNdKdOdPdQdRdSdTdUœZydVdW„ZzdtdXdY„Z{dZd[„Z|Gd\d]„d]ƒZ}Gd^d_„d_ƒZ~Gd`da„daejƒZ€Gdbdc„dcejƒZ�Gddd „d ƒZ‚Gded „d e‚ƒZƒdfdg„Z„dhdi„Z…e†j‡Zˆdjdk„Z‰Gdldm„dme‚ƒZŠGdndo„doeŠƒZ‹Gdpd„dƒZŒdudqdr„Z�eŽdsk�r e�ƒdS)vzP Read and write ZIP files. XXX references to utf-8 need further investigation. éNÚ BadZipFileÚ BadZipfileÚerrorÚ ZIP_STOREDÚ ZIP_DEFLATEDÚ ZIP_BZIP2ÚZIP_LZMAÚ is_zipfileÚZipInfoÚZipFileÚ PyZipFileÚ LargeZipFileÚPathc@s eZdZdS)rN)Ú__name__Ú __module__Ú __qualname__©rrú/usr/lib64/python3.8/zipfile.pyr+sc@seZdZdZdS)r zu Raised when writing a zipfile, the zipfile requires ZIP64 extensions and those extensions are disabled. N)rrrÚ__doc__rrrrr /siÿÿÿéÿÿéé ééé-é.é?s<4s4H2LHsPKéééééééé z<4s4B4HL2L5H2LsPKé é é ééééz <4s2B4HL2L2HsPKz<4sLQLsPKz <4sQ2H2L4QsPKiPKúr0Ústructr/ÚstructEndArchive64LocatorÚstringEndArchive64LocatorrÚsizeEndCentDir64ÚstructEndArchive64ÚstringEndArchive64Ú_ECD_SIGNATUREÚ_ECD_DISK_NUMBERÚ_ECD_DISK_STARTÚ_ECD_ENTRIES_THIS_DISKÚ_ECD_ENTRIES_TOTALÚ _ECD_SIZEÚ _ECD_OFFSET)ÚfpinÚoffsetÚendrecÚdataZsigZdisknoZreloffZdisksZszÚcreate_versionZ read_versionZdisk_numZdisk_dirZdircountZ dircount2ZdirsizeZ diroffsetrrrÚ _EndRecData64Ös@      þrXc Csh| dd¡| ¡}z| t d¡Wntk r<YdSX| ¡}t|ƒtkr¬|dd…tkr¬|dd…dkr¬t t |¡}t |ƒ}|  d¡|  |t¡t |t |ƒSt |dtdƒ}| |d¡| ¡}| t¡}|dk�rd|||t…}t|ƒtk�rdSt t t |¡ƒ}|t}||t|t|…}|  |¡|  ||¡t |||||ƒSdS) zÔReturn data from the "End of Central Directory" record, or None. The data is a list of the nine items in the ZIP "End of central dir" record followed by a tenth item, the file seek offset of this record.rrNr éþÿÿÿsr-i)rDÚtellÚsizeEndCentDirr:r>r0ÚstringEndArchiverFr/ÚstructEndArchiveÚlistr1rXÚmaxÚrfindÚ_ECD_COMMENT_SIZE) rSZfilesizerVrUZmaxCommentStartr5ZrecDataZ commentSizeÚcommentrrrr9sD  ÿþ      ÿr9c@s\eZdZdZdZddd„Zdd„Zdd d „Zd d „Zdd„Z e dddœdd„ƒZ dd„Z d S)r z>Class with attributes describing each file in the ZIP archive.)Ú orig_filenamerBÚ date_timeÚ compress_typeÚ_compresslevelrbr3Ú create_systemrWÚextract_versionÚreservedÚ flag_bitsÚvolumeÚ internal_attrÚ external_attrÚ header_offsetÚCRCÚ compress_sizeÚ file_sizeÚ _raw_timeÚNoName©é¼rrrrrcCsÈ||_| tdƒ¡}|dkr(|d|…}tjdkrJtj|krJ| tjd¡}||_||_|ddkrjtdƒ‚t |_ d|_ d|_ d|_ tjdkr”d|_nd|_t|_t|_d|_d|_d|_d|_d|_dS)Nrú/ruz+ZIP does not support timestamps before 1980r-Zwin32r)rcÚfindÚchrÚosÚsepÚreplacerBrdÚ ValueErrorrrerfrbr3ÚsysÚplatformrgÚDEFAULT_VERSIONrWrhrirjrkrlrm)ÚselfrBrdZ null_byterrrÚ__init__Xs0   zZipInfo.__init__cCsÜd|jj|jfg}|jtkr8| dt |j|j¡¡|jd?}|jd@}|rd| dt   |¡¡|rv| d|¡|  ¡}|rˆ|j r˜| d|j ¡|r¢|j rÈ|jtks¸|j |j krÈ| d|j ¡| d ¡d  |¡S) Nz<%s filename=%rú compress_type=%sr)rz filemode=%rz external_attr=%#xz file_size=%rz compress_size=%rú>Ú)Ú __class__rrBrerr1Úcompressor_namesÚgetrmÚstatÚfilemodeÚis_dirrqrpr2)r€rCÚhiÚloÚisdirrrrÚ__repr__ƒs0 ÿÿ    ÿ þ zZipInfo.__repr__NcCs||j}|ddd>|dd>B|dB}|dd>|d d>B|ddB}|jd @rfd}}}n|j}|j}|j}|j}d} |d krš|tkp˜|tk}|rÂd } |t | dt  | ¡d ||¡}|tksÒ|tkrê|sÞt d ƒ‚d}d}t } |j t k�rtt| ƒ} n|j tk�rtt| ƒ} t| |jƒ|_t| |jƒ|_| ¡\} } t tt|j|j| |j |||||t| ƒt|ƒ¡ } | | |S)z-Return the per-file header as a bytes object.rrur$rr!rrr&r rNz|j d¡|jdBfYSXdS)NÚasciiúutf-8é)rBÚencoderjÚUnicodeEncodeError©r€rrrr–ÇszZipInfo._encodeFilenameFlagscCs†|j}tj}t|ƒdk�r‚|d|dd…ƒ\}}|dt|ƒkrPtd||fƒ‚|dk�rp|dkrv|d|dd…ƒ}nV|dkr’|d |dd …ƒ}n:|d kr®|d |dd …ƒ}n|dkr¼d}ntd||fƒ‚d}|jdk�rt|ƒ|krðtdƒ‚|||_|d7}|jdk�r6t|ƒ|k�r$tdƒ‚|||_|d7}|jdk�rpt|ƒ|k�rXtdƒ‚|j}|||_|d7}||dd…}q dS)Nr r,z"Corrupt extra field %04x (size=%d)réz|_|rôd|_|jd O_n|j|_|S) a_Construct an appropriate ZipInfo for a file on the filesystem. filename should be the path to a file or directory on the filesystem. arcname is the name which it will have within the archive (by default, this will be the same as filename, but without a drive letter and with leading path separators removed). rr"rurté;)r¯rééé;r²Nrrvrr))Ú isinstanceryÚPathLikeÚfspathrˆÚS_ISDIRÚst_modeÚtimeÚ localtimeÚst_mtimeÚpathÚnormpathÚ splitdriverzÚaltseprmrqÚst_size) ÚclsrBÚarcnamer®Ústr�ÚmtimerdÚzinforrrÚ from_fileÿs0       zZipInfo.from_filecCs|jddkS)z2Return True if this archive member is a directory.éÿÿÿÿrv©rBr¦rrrrŠ%szZipInfo.is_dir)rsrt)N)N) rrrrÚ __slots__r�rŽr r–r¬Ú classmethodrÅrŠrrrrr >s + .2%cCs0tdƒD]"}|d@r"|d?dA}q|dL}q|S)Nrrl q[)Úrange)Úcrcr7rrrÚ_gen_crc/s   rÌcsld‰d‰d‰tdkr&ttttdƒƒƒat‰‡fdd„‰‡‡‡‡fdd„‰|D] }ˆ|ƒqL‡‡fd d „}|S) NixV4i‰gE#i�xV4écs|d?ˆ||Ad@AS)z(Compute the CRC32 primitive on one byte.réÿr)ZchrË)ÚcrctablerrÚcrc32Isz_ZipDecrypter..crc32cs<ˆ|ˆƒ‰ˆˆd@d@‰ˆddd@‰ˆˆd?ˆƒ‰dS)NrÎr�i„rr§r)Úc)rÐÚkey0Úkey1Úkey2rrÚ update_keysMs z"_ZipDecrypter..update_keyscsNtƒ}|j}|D]4}ˆdB}|||dAd?d@N}ˆ|ƒ||ƒqt|ƒS)zDecrypt a bytes object.rrrrÎ)Ú bytearrayr1Úbytes)rVrCr1rÑÚk)rÔrÕrrÚ decrypterWs z _ZipDecrypter..decrypter)Ú _crctabler^ÚmaprÌrÊ)ÚpwdÚprÙr)rÐrÏrÒrÓrÔrÕrÚ _ZipDecrypter?s   rÞc@s,eZdZdd„Zdd„Zdd„Zdd„Zd S) ÚLZMACompressorcCs d|_dS©N)Ú_compr¦rrrr�gszLZMACompressor.__init__cCsFt dtji¡}tjtjt tj|¡gd�|_t dddt |ƒ¡|S)NÚid©Úfiltersz| ¡rtdƒ‚|j ||¡|j ¡|_|jW5QR£SQRXdS)Nz}Can't reposition in the ZIP file while there is an open writing handle on it. Close the writing handle before trying to read.)rrr|rrDrZr)r€rTÚwhencerrrrDës  z_SharedFile.seekrÆc CsX|j�H| ¡rtdƒ‚|j |j¡|j |¡}|j ¡|_|W5QR£SQRXdS)NúyCan't read from the ZIP file while there is an open writing handle on it. Close the writing handle before trying to read.)rrr|rrDrr>rZ©r€ÚnrVrrrr>õs  z_SharedFile.readcCs$|jdk r |j}d|_| |¡dSrà)rr)r€Úfileobjrrrr s z_SharedFile.closeN)r)rÆ)rrrr�rDr>r rrrrrás rc@s4eZdZdd„Zdd„Zdd„Zdd„Zd d „Zd S) Ú _TellablecCs||_d|_dS©Nr)r<rT©r€r<rrrr�sz_Tellable.__init__cCs|j |¡}|j|7_|Srà)r<ÚwriterT)r€rVrrrrr s z_Tellable.writecCs|jSrà)rTr¦rrrrZsz_Tellable.tellcCs|j ¡dSrà)r<rër¦rrrrësz_Tellable.flushcCs|j ¡dSrà)r<r r¦rrrr sz_Tellable.closeN)rrrr�rrZrër rrrrrs rcs¦eZdZdZdZdZdZd(dd„Zd d „Zd d „Z d)dd„Z d*dd„Z dd„Z d+dd„Z dd„Zdd„Zdd„Zdd„Z‡fdd „Zd!d"„Zd,d$d%„Zd&d'„Z‡ZS)-Ú ZipExtFilezZFile-like object for reading an archive member. Is returned by ZipFile.open(). i@iiNFcCs(||_||_||_|j|_|j|_|j|_t |jƒ|_ d|_ d|_ d|_ d|_||_|j|_t|dƒrz|j|_tdƒ|_nd|_d|_z4| ¡r¸| ¡|_|j|_|j|_|j|_d|_Wntk rÎYnXd|_|�r$|j d@rö|j!d?d@}n|jd?d@}| "¡}||k�r$t#d |j$ƒ‚dS) NFr-rroTrrÎr§zBad password for file %r)%Ú_fileobjÚ_pwdÚ_close_fileobjreÚ_compress_typerpÚ_compress_leftrqÚ_leftrÿÚ _decompressorÚ_eofÚ _readbufferÚ_offsetÚnewlinesÚmoderBÚnamer@roÚ _expected_crcrÐÚ _running_crcÚ _seekablerrZÚ_orig_compress_startÚ_orig_compress_sizeÚ_orig_file_sizeÚ_orig_start_crcÚAttributeErrorÚ _decrypterrjrrÚ_init_decrypterr÷rc)r€rr ÚzipinforÜZ close_fileobjZ check_byteÚhrrrr�)sF       zZipExtFile.__init__cCs4t|jƒ|_|j d¡}|jd8_| |¡dS)Nrr&)rÞrr*rr>r)r€rŸrrrr+\s  zZipExtFile._init_decryptercCsvd|jj|jjfg}|jsX| d|j|jf¡|jtkrb| dt   |j|j¡¡n | d¡| d¡d  |¡S)Nú<%s.%sz name=%r mode=%rr‚ú [closed]rƒr„) r…rrÚclosedr1r!r rrr†r‡r2©r€rCrrrrŽgsÿ ÿÿ  zZipExtFile.__repr__rÆcCsL|dkr>|j d|j¡d}|dkr>|j|j|…}||_|Stj ||¡S)zrRead and return a line from the stream. If limit is specified, at most limit bytes will be read. ró r)rrwrÚioÚBufferedIOBaseÚreadline)r€Úlimitr6Úlinerrrr5uszZipExtFile.readlinercCsr|t|jƒ|jkr\| |¡}t|ƒ|jkrJ||j|jd…|_d|_n|jt|ƒ8_|j|j|jd…S)z6Returns buffered bytes without advancing the position.Nri)r0rrr>)r€rÚchunkrrrÚpeek…s zZipExtFile.peekcCsdS©NTrr¦rrrÚreadable’szZipExtFile.readablecCs|dks|dkrH|j|jd…}d|_d|_|jsD|| |j¡7}q,|S||j}|t|jƒkrz|j|j|…}||_|S|t|jƒ}|j|jd…}d|_d|_|dkrü|jsü| |¡}|t|ƒkræ||_||_||d|…7}qü||7}|t|ƒ8}q¤|S)zŽRead and return up to n bytes. If the argument is omitted, None, or negative, data is read and returned until EOF is reached. Nrr-©rrrÚ_read1ÚMAX_Nr0)r€rÚbufÚendrVrrrr>•s4   zZipExtFile.readcCs@|jdkrdSt||jƒ|_|jr<|j|jkr     zZipExtFile.read1cCs"|js|dkrdS|jtkrH|jj}|t|ƒkrR|| |t|ƒ¡7}n | |¡}|jtkrj|jdk|_nx|jtkrÂt ||j ƒ}|j  ||¡}|jj p¨|jdko¨|jj |_|jrâ||j  ¡7}n |j  |¡}|jj pÞ|jdk|_|d|j…}|jt|ƒ8_|jdk�rd|_| |¡|S)Nrr-T)rrrrZunconsumed_tailr0Ú_read2rrr_Ú MIN_READ_SIZErðrïrërrBr rrrr=ås4       þ   zZipExtFile._read1cCsd|jdkrdSt||jƒ}t||jƒ}|j |¡}|jt|ƒ8_|sLt‚|jdk r`| |¡}|S)Nrr-) rr_rEÚminrr>r0ÚEOFErrorr*r rrrrD s      zZipExtFile._read2cs&z|jr|j ¡W5tƒ ¡XdSrà)Úsuperr rrr¦©r…rrr szZipExtFile.closecCs|jSrà)r$r¦rrrr szZipExtFile.seekablercCs>|jst d¡‚| ¡}|dkr&|}n.|dkr8||}n|dkrL|j|}ntdƒ‚||jkrd|j}|dkrpd}||}||j}|dkr¤|t|jƒkr¤||_d}nf|dk�r |j   |j ¡|j |_ |j|_|j|_d|_d|_t|jƒ|_d|_|}|jdk �r | ¡|dk�r6t|j|ƒ}| |¡||8}�q | ¡S)Nú!underlying stream is not seekablerrrzCwhence must be os.SEEK_SET (0), os.SEEK_CUR (1), or os.SEEK_END (2)r-F)r$r3ÚUnsupportedOperationrZr'r|rr0rrrDr%r(r#r&rrrÿrrrr*r+rFÚ MAX_SEEK_READr>)r€rTr Zcurr_posZnew_posZ read_offsetZ buff_offsetZread_lenrrrrD#sH            zZipExtFile.seekcCs0|jst d¡‚|j|jt|jƒ|j}|S)NrJ)r$r3rKr'rr0rr)r€ZfileposrrrrZSs zZipExtFile.tell)NF)rÆ)r)rÆ)r)rrrrr>rErLr�r+rŽr5r9r;r>rBrCr=rDr rrDrZÚ __classcell__rrrIrrs*ÿ 3    ! %$  0rcs@eZdZdd„Zedd„ƒZdd„Zdd„Z‡fd d „Z‡Z S) Ú _ZipWriteFilecCs8||_||_||_t|j|jƒ|_d|_d|_d|_ dSr) Ú_zinfoÚ_zip64Ú_zipfilerþrerfÚ _compressorÚ _file_sizeÚ_compress_sizeÚ_crc)r€ÚzfrÄr™rrrr�[sÿz_ZipWriteFile.__init__cCs|jjSrà)rQr<r¦rrrresz_ZipWriteFile._fileobjcCsdSr:rr¦rrrÚwritableisz_ZipWriteFile.writablecCsf|jrtdƒ‚t|ƒ}|j|7_t||jƒ|_|jrV|j |¡}|jt|ƒ7_|j   |¡|S)NzI/O operation on closed file.) r0r|r0rSrÐrUrRrêrTrr)r€rVÚnbytesrrrrls  z_ZipWriteFile.writec sb|jr dS�zFtƒ ¡|jrR|j ¡}|jt|ƒ7_|j   |¡|j|j _ n |j |j _ |j|j _|j |j _|j jd@rÀ|jr†dnd}|j   t |t|j j|j j |j j¡¡|j  ¡|j_nn|jsê|j tkrØtdƒ‚|jtkrêtdƒ‚|j  ¡|j_|j  |j j¡|j   |j  |j¡¡|j  |jj¡|jj |j ¡|j |jj|j j <W5d|j_XdS)NFrzdd „Zd?d!d"œd#d$„Zd@d%d&„ZdAd'd(„ZdBd)d*„Zed+d,„ƒZd-d.„Zd/d0„ZdCd1d2„ZdDd3d4„Zd5d6„Z d7d8„Z!d9d:„Z"d;d<„Z#dS)Er ai Class with methods to open, read, write, close, list zip files. z = ZipFile(file, mode="r", compression=ZIP_STORED, allowZip64=True, compresslevel=None) file: Either the path to the file, or a file-like object. If it is a path, the file will be opened and closed by ZipFile. mode: The mode can be either read 'r', write 'w', exclusive create 'x', or append 'a'. compression: ZIP_STORED (no compression), ZIP_DEFLATED (requires zlib), ZIP_BZIP2 (requires bz2) or ZIP_LZMA (requires lzma). allowZip64: if True ZipFile will create files with ZIP64 extensions when needed, otherwise it will raise an exception when this would be necessary. compresslevel: None (default for the given compression type) or an integer specifying the level to pass to the compressor. When using ZIP_STORED or ZIP_LZMA this keyword has no effect. When using ZIP_DEFLATED integers 0 through 9 are accepted. When using ZIP_BZIP2 integers 1 through 9 are accepted. NÚrTr­c CsP|dkrtdƒ‚t|ƒ||_d|_d|_i|_g|_||_||_||_ d|_ d|_ ||_ t |tjƒrpt |¡}t |tƒræd|_||_ddd d dd d d œ}||}zt ||¡|_Wqätk rÞ||krØ||}Yq¢‚YqäXqäq¢nd|_||_t|ddƒ|_d|_t ¡|_d|_d|_�z|dk�r4| ¡nð|dk�r¾d|_z|j  ¡|_!Wn2t"tfk �r†t#|jƒ|_d|_!d|_Yn6Xz|j $|j!¡Wn t"tfk �rºd|_YnXnf|dk�rz| ¡|j $|j!¡Wn6t%k �r|j $dd¡d|_|j  ¡|_!YnXntdƒ‚Wn$|j} d|_| &| ¡‚YnXdS)z]Open the ZIP file with mode read 'r', write 'w', exclusive create 'x', or append 'a'.)r^ÚwÚxÚaz+ZipFile requires mode 'r', 'w', 'x', or 'a'FrNr-r?úw+búx+búr+bÚwbZxb)r^r_r`rardrbrcrr!Tr^)r_r`rarz"Mode must be 'r', 'w', 'x', or 'a')'r|rûÚ _allowZip64Ú _didModifyÚdebugr\r[rúrýr rÜÚ_commentÚ_strict_timestampsr³ryr´rµÚstrÚ _filePassedrBr3rAr<r:ÚgetattrÚ _fileRefCntÚ threadingÚRLockrr$rÚ_RealGetContentsrZrZr)rrDrÚ_fpclose) r€rr rúÚ allowZip64rýr®ZmodeDictr‰r<rrrr�ÂsŠ   ÿ         zZipFile.__init__cCs|Sràrr¦rrrÚ __enter__szZipFile.__enter__cCs | ¡dSrà©r )r€ÚtypeÚvalueÚ tracebackrrrÚ__exit__szZipFile.__exit__cCs‚d|jj|jjfg}|jdk rd|jr8| d|j¡n|jdk rR| d|j¡| d|j¡n | d¡| d¡d |¡S)Nr.z file=%rz filename=%rz mode=%rr/rƒr„) r…rrr<rlr1rBr r2r1rrrrŽ"sÿ    zZipFile.__repr__c Cs¸|j}z t|ƒ}Wntk r.tdƒ‚YnX|sr3ÚBytesIOÚsizeCentralDirr0rFr/ÚstructCentralDirÚ _CD_SIGNATUREÚstringCentralDirÚ_CD_FILENAME_LENGTHÚdecoder Ú_CD_EXTRA_FIELD_LENGTHr3Ú_CD_COMMENT_LENGTHrbÚ_CD_LOCAL_HEADER_OFFSETrnrWrgrhrirjrerorprqÚMAX_EXTRACT_VERSIONrùrkrlrmrrrdr¬r[r1r\rB)r€r<rUZsize_cdZ offset_cdÚconcatZinferredrVr{ÚcentdirrBÚflagsr`ÚtÚdrrrrq0s�                  þ ÿ ÿ   ÿþ zZipFile._RealGetContentscCsdd„|jDƒS)z+Return a list of file names in the archive.cSsg|] }|j‘qSrrÇ)Ú.0rVrrrÚ €sz$ZipFile.namelist..©r[r¦rrrÚnamelist~szZipFile.namelistcCs|jS)zJReturn a list of class ZipInfo instances for files in the archive.r‘r¦rrrÚinfolist‚szZipFile.infolistcCsLtdd|d�|jD]0}d|jdd…}td|j||jf|d�qdS)z+Print a table of contents for the zip file.z%-46s %19s %12s)z File Namez Modified ZSize©rz%d-%02d-%02d %02d:%02d:%02dNr"z %-46s %s %12d)r|r[rdrBrq)r€rrÄÚdaterrrÚprintdir‡sÿ ÿzZipFile.printdirc Cs^d}|jD]N}z*| |jd¡�}| |¡r,q W5QRXWq tk rV|jYSXq dS)z%Read all the files and check the CRC.ir^N)r[rArBr>r)r€Z chunk_sizerÄÚfrrrÚtestzip�s  zZipFile.testzipcCs$|j |¡}|dkr td|ƒ‚|S)z,Return the instance of ZipInfo given 'name'.Nz(There is no item named %r in the archive)r\r‡ÚKeyError)r€r!ÚinforrrÚgetinfo�s  ÿzZipFile.getinfocCs6|r t|tƒs tdt|ƒjƒ‚|r,||_nd|_dS)z)Set default password for encrypted files.úpwd: expected bytes, got %sN)r³r×Ú TypeErrorrvrrÜ)r€rÜrrrÚ setpassword¦s zZipFile.setpasswordcCs|jS)z.The comment text associated with the ZIP file.)rir¦rrrrb¯szZipFile.commentcCs^t|tƒstdt|ƒjƒ‚t|ƒtkrNddl}|jdtdd�|dt…}||_ d|_ dS)Nzcomment: expected bytes, got %srz3Archive comment is too long; truncating to %d bytesr©Ú stacklevelT) r³r×r�rvrr0ÚZIP_MAX_COMMENTÚwarningsÚwarnrirg)r€rbr¢rrrrb´s  ÿÿ c Cs.| |d|¡�}| ¡W5QR£SQRXdS)zReturn file bytes for name.r^N©rAr>)r€r!rÜr<rrrr>Ász ZipFile.readF©Ú force_zip64c s|dkrtdƒ‚|r0t|tƒs0tdt|ƒjƒ‚|rD|dkrDtdƒ‚ˆjsRtdƒ‚t|tƒrb|}n,|dkr„t|ƒ}ˆj|_ ˆj |_ n ˆ  |¡}|dkr¤ˆj ||d�Sˆjr²tdƒ‚ˆjd 7_tˆj|jˆjˆj‡fd d „ƒ}�z| t¡}t|ƒtk�rtd ƒ‚t t|¡}|ttk�r&td ƒ‚| |t¡}|t�rL| |t¡|jd@�r`t dƒ‚|jd@�rtt dƒ‚|t!d@�rŽ| "d¡} n | "d¡} | |j#k�r¶td|j#|fƒ‚|jd @} | �ræ|�sÒˆj$}|�sêt%d|ƒ‚nd}t&||||dƒWS| '¡‚YnXdS)auReturn file-like object for 'name'. name is a string for the file name within the ZIP file, or a ZipInfo object. mode should be 'r' to read a file already in the ZIP file, or 'w' to write to a file newly added to the archive. pwd is the password to decrypt files (only used for reading). When writing, if the file size is not known in advance but may exceed 2 GiB, pass force_zip64 to use the ZIP64 format, which can handle large files. If the size is known in advance, it is best to pass a ZipInfo instance for name, with zinfo.file_size set. >r_r^zopen() requires mode "r" or "w"rœr_z'pwd is only supported for reading filesz2Attempt to use ZIP archive that was already closedr¥r rcsˆjSrà)rrr¦rrÚ÷r-zZipFile.open..zTruncated file headerz Bad magic number for file headeré z$compressed patched data (flag bit 5)é@zstrong encryption (flag bit 6)r£r¢rzz/File name in directory %r and header %r differ.z6File %r is encrypted, password required for extractionNT)(r|r³r×r�rvrr<r rúrerýrfr›Ú_open_to_writerrnrrnrrrr>ÚsizeFileHeaderr0rrFr/r—Ú _FH_SIGNATUREr˜Ú_FH_FILENAME_LENGTHÚ_FH_EXTRA_FIELD_LENGTHrjrùÚ_FH_GENERAL_PURPOSE_FLAG_BITSr…rcrÜr÷rr ) r€r!r rÜr¦rÄZzef_fileZfheaderÚfnameZ fname_strZ is_encryptedrr¦rrAÆs~ ÿ     ÿ        ÿÿ ÿz ZipFile.opencCsæ|r|jstdƒ‚|jr tdƒ‚t|dƒs0d|_d|_d|_d|_|jt krZ|jdO_|j sn|jdO_|j szd|_ |jo�|p�|jdt k}|j r¦|j  |j¡|j  ¡|_| |¡d |_|j  | |¡¡d |_t|||ƒS) NzHforce_zip64 is True, but allowZip64 was False when opening the ZIP file.zzCan't write to the ZIP file while there is another write handle open on it. Close the first handle before opening another.rqrrré€gÍÌÌÌÌÌð?T)rfr|rr@rqrprorjrerr$rmr�r<rDrZrZrnÚ _writecheckrgrr rN)r€rÄr¦r™rrrrª(s8 ÿ  ÿ  zZipFile._open_to_writecCs*|dkrt ¡}n t |¡}| |||¡S)a#Extract a member from the archive to the current working directory, using its full name. Its file information is extracted as accurately as possible. `member' may be a filename or a ZipInfo object. You can specify a different directory using `path'. N)ryÚgetcwdrµÚ_extract_member)r€Úmemberr»rÜrrrÚextractSs  zZipFile.extractcCsH|dkr| ¡}|dkr"t ¡}n t |¡}|D]}| |||¡q0dS)zõExtract all members from the archive to the current working directory. `path' specifies a different directory to extract to. `members' is optional and must be a subset of the list returned by namelist(). N)r’ryr³rµr´)r€r»ÚmembersrÜr,rrrÚ extractall`s  zZipFile.extractallcCs^|j}|s(d}t |dt|ƒ¡}||_| |¡}dd„| |¡Dƒ}| dd„|Dƒ¡}|S)z;Replace bad characters and remove trailing dots from parts.z:<>|"?*Ú_css|]}| d¡VqdS)Ú.N)Úrstrip©r�r`rrrÚ {sz1ZipFile._sanitize_windows_name..css|]}|r|VqdSràrr¼rrrr½}s)Ú!_windows_illegal_name_trans_tablerkÚ maketransr0Ú translateÚsplitr2)rÀrÁÚpathsepÚtableZillegalrrrÚ_sanitize_windows_nameqs zZipFile._sanitize_windows_namec sLt|tƒs| |¡}|j dtjj¡}tjjrB| tjjtjj¡}tj  |¡d}dtjj tjj f‰tjj  ‡fdd„|  tjj¡Dƒ¡}tjjdkr¦| |tjj¡}tj  ||¡}tj |¡}tj |¡}|rætj |¡sæt |¡| ¡�r tj |¡�st |¡|S|j||d��(}t|dƒ�}t ||¡W5QRXW5QRX|S) zbExtract the ZipInfo object 'member' to a physical file on the path targetpath. rvrr„c3s|]}|ˆkr|VqdSràrr¼©Zinvalid_path_partsrrr½‘sÿz*ZipFile._extract_member..ú\)rÜre)r³r r›rBr{ryr»rzr¾r½ÚcurdirÚpardirr2rÁrÄr¼ÚdirnameÚexistsÚmakedirsrŠr�ÚmkdirrAÚshutilÚ copyfileobj)r€rµZ targetpathrÜrÁZ upperdirsÚsourceÚtargetrrÅrr´€s2  &      ÿ zZipFile._extract_membercCs¢|j|jkr(ddl}|jd|jdd�|jdkr:tdƒ‚|jsHtdƒ‚t|jƒ|j sžd}t |j ƒt krpd }n|j tkr€d }n|jtkrŽd }|ržt|d ƒ‚dS) z6Check for errors before writing a file to the archive.rNzDuplicate name: %rrrŸ©r_r`raz&write() requires mode 'w', 'x', or 'a'z4Attempt to write ZIP archive that was already closedú Files countZFilesizez Zipfile sizeú would require ZIP64 extensions)rBr\r¢r£r r|r<rûrerfr0r[ÚZIP_FILECOUNT_LIMITrqr�rnr )r€rÄr¢Úrequires_zip64rrrr²ªs,  ÿ   ÿzZipFile._writecheckc CsP|jstdƒ‚|jrtdƒ‚tj|||jd�}| ¡rDd|_d|_n0|dk rT||_ n|j |_ |dk rl||_ n|j |_ | ¡�r|j �„|jrš|j |j¡|j ¡|_|j tkr¾|jdO_| |¡d|_|j |¡||j|j<|j | d¡¡|j ¡|_W5QRXnCan't write to ZIP archive while an open writing handle existsr­rNrTFr?r_i ) r<r|rr rÅrjrŠrprorerúrfrýrr$rDrZrZrnrrjr²rgr[r1r\rBrr rArÍrÎ)r€rBrÁrerýrÄÚsrcÚdestrrrrÁsFÿÿÿ      z ZipFile.writec Csøt|tƒr| d¡}t|tƒsxt|t t ¡¡dd…d�}|j|_|j|_ |j ddkrpd|_ |j dO_ q|d |_ n|}|j sŠt d ƒ‚|jr˜t d ƒ‚|dk r¦||_|dk r´||_ t|ƒ|_|j�*|j|d d ��}| |¡W5QRXW5QRXdS)aWrite a file into the archive. The contents is 'data', which may be either a 'str' or a 'bytes' instance; if it is a 'str', it is encoded as UTF-8 first. 'zinfo_or_arcname' is either a ZipInfo instance or the name of the file in the archive.r¢Nr")rBrdrÆrviýAr)r±rÖz?Can't write to ZIP archive while an open writing handle exists.r_)r )r³rkr¤r r¸r¹rúrerýrfrBrmr<r|rr0rqrrAr)r€Zzinfo_or_arcnamerVrerýrÄrØrrrÚwritestròs:   ÿÿÿ zZipFile.writestrcCs | ¡dS)z2Call the "close()" method in case the user forgot.Nrur¦rrrÚ__del__szZipFile.__del__c Cs||jdkrdS|jrtdƒ‚zB|jdkr\|jr\|j�"|jrJ|j |j ¡|  ¡W5QRXW5|j}d|_| |¡XdS)zOClose the file, and for mode 'w', 'x' and 'a' write the ending records.NzvCan't close the ZIP file while there is an open writing handle on it. Close the writing handle before closing the zip.rÑ) r<rr|rrr rgrr$rDrZÚ_write_end_recordrrrrr s z ZipFile.closecCs‚|jD�]D}|j}|ddd>|dd>B|dB}|dd>|d d>B|ddB}g}|jtksr|jtkr”| |j¡| |j¡d }d }n |j}|j}|jtkr¼| |j¡d }n|j}|j} d} |�r t| d ƒ} t j d d t |ƒddt |ƒf|žŽ| } t } |j tk�r$tt| ƒ} n|j tk�r:tt| ƒ} t| |jƒ} t| |jƒ} zZ| ¡\} }t   tt| |j| |j||j |||j||t | ƒt | ƒt |jƒd|j|j|¡}Wnltk �rttt| |j| |j|j |j |||j||t |j!ƒt | ƒt |jƒd|j|j|ft"j#d�‚YnX|j$ %|¡|j$ %| ¡|j$ %| ¡|j$ %|j¡q|j$ &¡}t |jƒ}||j'}|j'}d}|t(k�r†d}n|tk�r–d}n|tk�r¤d}|�r$|j)�s¾t*|dƒ‚t   t+t,ddddd||||¡ }|j$ %|¡t   t-t.d|d¡}|j$ %|¡t/|dƒ}t/|d ƒ}t/|d ƒ}t   t0t1dd||||t |j2ƒ¡ }|j$ %|¡|j$ %|j2¡|j3dk�rt|j$ 4¡|j$ 5¡dS)Nrrur$rr!rrr&r r�)rr,ÚQrr”rÒzCentral directory offsetzCentral directory sizerÓé,rrra)6r[rdrqr�rpr1rnr3r8rFr‘r0r“rerr_r”rr•rhrWr–r�rƒrgrirorbrlrmÚDeprecationWarningr|rjrBr}Ústderrr<rrZrZrÔrfr rJrKrGrHrFr]r\rir Útruncaterë)r€rÄršr›rœr3rqrprnZ extra_datar�rhrWrBrjr‹Zpos2Z centDirCountZ centDirSizeZ centDirOffsetrÕZ zip64endrecZ zip64locrecrUrrrrÛ5s $$ ÿ      þþþ       ùúú         ÿý þ    þ   zZipFile._write_end_recordcCs&|jd8_|js"|js"| ¡dS)Nr)rnrlr rrrrrr�s zZipFile._fpclose)N)N)r^N)F)NN)NNN)NNN)NN)$rrrrr<r¾rr�rtryrŽrqr’r“r–r˜r›ržr]rbÚsetterr>rArªr¶r¸rÉrÄr´r²rrÙrÚr rÛrrrrrrr ¨sTÿÿ ZN      b +  *ÿ 2ÿ )hc@s4eZdZdZdeddfdd„Zd d d „Zd d „ZdS)r zDClass to create ZIP archives with Python library files and packages.r^TrÆcCstj|||||d�||_dS)N)r rúrs)r r�Ú _optimize)r€rr rúrsÚoptimizerrrr�§s ÿzPyZipFile.__init__r„NcCs¼t |¡}|rD||ƒsD|jr@tj |¡r,dnd}td||fƒdStj |¡\}}tj |¡�rhtj |d¡}tj |¡�r¸|r�d||f}n|}|jr¨td|d|ƒ|  |d d …|¡\}} |jrÐtd | ƒ|  || ¡t t  |¡ƒ} |   d¡| D]¼} tj || ¡} tj | ¡\} }tj | ¡�rRtj tj | d¡¡�r´|j| ||d �qø|d krø|�r~|| ƒ�s~|jrøtd| ƒqø|  | d d …|¡\}} |j�r¨td | ƒ|  || ¡qøn®|j�rÊtd|ƒt t  |¡ƒD]Œ} tj || ¡} tj | ¡\} }|d k�rØ|�r,|| ƒ�s,|j�rØtd| ƒ�qØ|  | d d …|¡\}} |j�rVtd | ƒ|  || ¡�qØnP|d d…d k�r‚tdƒ‚|  |d d …|¡\}} |j�r¬td| ƒ|  || ¡dS)a¦Add all files from "pathname" to the ZIP archive. If pathname is a package directory, search the directory and all package subdirectories recursively for all *.py and enter the modules into the archive. If pathname is a plain directory, listdir *.py and enter all modules. Else, pathname must be a Python *.py file and the module will be put into the archive. Added modules are always module.pyc. This method will compile the module.py into module.pyc if necessary. If filterfunc(pathname) is given, it is called with every argument. When it is False, the file or directory is skipped. r»rz%s %r skipped by filterfuncNz __init__.pyú%s/%szAdding package inÚasréýÿÿÿZAdding)Ú filterfuncú.pyzfile %r skipped by filterfunczAdding files from directoryz.Files added with writepy() must end with ".py"z Adding file)ryrµrhr»r�r|rÁr2ÚisfileÚ _get_codenamerÚsortedÚlistdirÚremoveÚsplitextÚwritepyr÷)r€ÚpathnameÚbasenamerçZlabelÚdirr!Zinitnamer°rÁZdirlistrBr»ÚrootZextrrrrï­s€     ÿ ÿ    ÿ ÿ zPyZipFile.writepyc sd‡fdd„ }|d}|d}tjj|dd�}tjj|dd�}tjj|d d�}ˆjdk�r\tj |¡rˆt |¡jt |¡jkrˆ|} } nÒtj |¡r¶t |¡jt |¡jkr¶|} |} n¤tj |¡rät |¡jt |¡jkrä|} |} nvtj |¡�rt |¡jt |¡jk�r|} |} nD||ƒ�rRt j j d k�r4|} nt j j dk�rH|} n|} |} n|} } n’ˆjd k�rr|} |} n<|} ˆjdk�rˆ|} n&ˆjd k�rš|} nd   ˆj¡} t | ƒ‚tj | ¡�rÖt | ¡jt |¡jk�sî||ˆjd ��sî|} } tj | ¡d} |�rd || f} | | fS)aReturn (filename, archivename) for the path. Given a module name path, return the correct file path and archive name, compiling if necessary. For example, given /python/lib/string, return (/python/lib/string.pyc, string). rÆc sfddl}ˆjrtd|ƒz|j|d|d�Wn4|jk r`}zt|jƒWY¢dSd}~XYnXdS)NrZ CompilingT)ÚdoraiserãF)Ú py_compilerhr|ÚcompileÚPyCompileErrorÚmsg)rrãrõÚerrr¦rrÚ_compiles  z)PyZipFile._get_codename.._compilerèz.pycr„)Ú optimizationrrrz"invalid value for 'optimize': {!r})rãrä)rÆ)Ú importlibÚutilÚcache_from_sourcerâryr»rérˆrºr}rŒrãÚformatr|rÁ) r€rðrñrúZfile_pyZfile_pycZ pycache_opt0Z pycache_opt1Z pycache_opt2rÁr°røZ archivenamerr¦rrêÿsj   ÿ  ÿ ÿÿ      ÿ zPyZipFile._get_codename)r„N)rrrrrr�rïrêrrrrr ¤sÿ  RcCst t|ƒdd¡S)a2 Given a path with elements separated by posixpath.sep, generate all parents of that path. >>> list(_parents('b/d')) ['b'] >>> list(_parents('/b/d/')) ['/b'] >>> list(_parents('b/d/f/')) ['b/d', 'b'] >>> list(_parents('b')) [] >>> list(_parents('')) [] rN)Ú itertoolsÚisliceÚ _ancestry)r»rrrÚ_parentsRsrccs4| tj¡}|r0|tjkr0|Vt |¡\}}q dS)aR Given a path with elements separated by posixpath.sep, generate all elements of that path >>> list(_ancestry('b/d')) ['b/d', 'b'] >>> list(_ancestry('/b/d/')) ['/b/d', '/b'] >>> list(_ancestry('b/d/f/')) ['b/d/f', 'b/d', 'b'] >>> list(_ancestry('b')) ['b'] >>> list(_ancestry('')) [] N)r»Ú posixpathrzrÁ)r»Útailrrrres rcCst t|ƒj|¡S)zZ Return items in minuend not in subtrahend, retaining order with O(1) lookup. )rÚ filterfalseÚsetÚ __contains__)ZminuendZ subtrahendrrrÚ _differencesr csHeZdZdZedd„ƒZ‡fdd„Zdd„Zdd „Ze d d „ƒZ ‡Z S) Ú CompleteDirszk A ZipFile subclass that ensures that implied directories are always included in the namelist. cCs.tj tt|ƒ¡}dd„|Dƒ}tt||ƒƒS)Ncss|]}|tjVqdSrà)rrz)r�rÝrrrr½�sz-CompleteDirs._implied_dirs..)rÚchainÚ from_iterablerÛrÚ_deduper )ÚnamesÚparentsZas_dirsrrrÚ _implied_dirs�szCompleteDirs._implied_dirscs tt|ƒ ¡}|t| |¡ƒSrà)rHr r’r^r)r€rrIrrr’“szCompleteDirs.namelistcCs t| ¡ƒSrà)rr’r¦rrrÚ _name_set—szCompleteDirs._name_setcCs,| ¡}|d}||ko||k}|r(|S|S)zx If the name represents a directory, return that name as a directory (with the trailing slash). rv)r)r€r!rrÉZ dir_matchrrrÚ resolve_diršszCompleteDirs.resolve_dircCsNt|tƒr|St|tƒs ||ƒSd|jkr.t}| |¡}t|ƒ t|ƒ¡|S)zl Given a source (filename or zipfile), return an appropriate CompleteDirs subclass. r^)r³r r r Ú__new__ÚvarsÚupdate)rÀrÏÚresrrrÚmake¤s    zCompleteDirs.make) rrrrÚ staticmethodrr’rrrÉrrMrrrIrr ‡s   r cs,eZdZdZ‡fdd„Z‡fdd„Z‡ZS)Ú FastLookupzV ZipFile subclass to ensure implicit dirs exist and are resolved rapidly. c s:t t¡�|jW5QR£SQRXtt|ƒ ¡|_|jSrà)Ú contextlibÚsuppressr)Z_FastLookup__namesrHrr’r¦rIrrr’¾s zFastLookup.namelistc s:t t¡�|jW5QR£SQRXtt|ƒ ¡|_|jSrà)rrr)Z_FastLookup__lookuprHrrr¦rIrrrÄs zFastLookup._name_set)rrrrr’rrMrrrIrr¹s rc@sžeZdZdZdZd#dd„Zedd„ƒZedd „ƒZd d „Z d d „Z dd„Z dd„Z dd„Z dd„Zdd„Zdd„Zdd„Zdd„Zdd„ZeZed d!„ƒZd"S)$ru’ A pathlib-compatible interface for zip files. Consider a zip file with this structure:: . ├── a.txt └── b ├── c.txt └── d └── e.txt >>> data = io.BytesIO() >>> zf = ZipFile(data, 'w') >>> zf.writestr('a.txt', 'content of a') >>> zf.writestr('b/c.txt', 'content of c') >>> zf.writestr('b/d/e.txt', 'content of e') >>> zf.filename = 'abcde.zip' Path accepts the zipfile object itself or a filename >>> root = Path(zf) From there, several path operations are available. Directory iteration (including the zip file itself): >>> a, b = root.iterdir() >>> a Path('abcde.zip', 'a.txt') >>> b Path('abcde.zip', 'b/') name property: >>> b.name 'b' join with divide operator: >>> c = b / 'c.txt' >>> c Path('abcde.zip', 'b/c.txt') >>> c.name 'c.txt' Read text: >>> c.read_text() 'content of c' existence: >>> c.exists() True >>> (b / 'missing.txt').exists() False Coercion to string: >>> str(c) 'abcde.zip/b/c.txt' z>{self.__class__.__name__}({self.root.filename!r}, {self.at!r})r„cCst |¡|_||_dSrà)rrróÚat)r€rórrrrr� s z Path.__init__cCst |jj|j¡Srà)Ú functoolsÚpartialrórArr¦rrrrA sz Path.opencCst |j d¡¡S©Nrv)rrñrr»r¦rrrr! sz Path.namec Os6| ¡�$}tj|f|ž|Ž ¡W5QR£SQRXdSrà)rAr3Ú TextIOWrapperr>)r€ÚargsÚkwargsÚstrmrrrÚ read_text s zPath.read_textc Cs(| ¡�}| ¡W5QR£SQRXdSràr¤)r€r#rrrÚ read_bytes s zPath.read_bytescCst |j d¡¡|j d¡kSr)rrÉrr»)r€r»rrrÚ _is_child" szPath._is_childcCs t|j|ƒSrà)rró)r€rrrrÚ_next% sz Path._nextcCs|j p|j d¡Sr)rÚendswithr¦rrrrŠ( sz Path.is_dircCs | ¡ Srà)rŠr¦rrrÚis_file+ sz Path.is_filecCs|j|j ¡kSrà)rrórr¦rrrrÊ. sz Path.existscCs.| ¡stdƒ‚t|j|j ¡ƒ}t|j|ƒS)NzCan't listdir a file)rŠr|rÛr'rór’Úfilterr&)r€ZsubsrrrÚiterdir1 sz Path.iterdircCst |jj|j¡Srà)rr2rórBrr¦rrrÚ__str__7 sz Path.__str__cCs|jj|d�S)Nr¦)Ú _Path__reprrÿr¦rrrrŽ: sz Path.__repr__cCs t |j|¡}| |j |¡¡Srà)rr2rr'rór)r€ÚaddÚnextrrrÚjoinpath= sz Path.joinpathcCs(t |j d¡¡}|r|d7}| |¡Sr)rrÉrr»r')r€Z parent_atrrrÚparentC sz Path.parentN)r„)rrrrr-r�r]rAr!r$r%r&r'rŠr)rÊr+r,rŽr0Ú __truediv__r1rrrrrËs*@   c sÆddl}d}|j|d�}|jdd�}|jdddd d �|jd d d ddd�|jdddddd�|jddddd �| |¡}|jdk rÄ|j}t|dƒ�}| ¡}W5QRX|rºtd  |¡ƒtdƒnþ|j dk rô|j }t|dƒ�}|  ¡W5QRXnÎ|j dk �r,|j \}}t|dƒ�}|  |¡W5QRXn–|jdk �rÂ|j d¡} |j} ‡fdd„‰t| dƒ�\}| D]P} tj | ¡} | �s�tj tj | ¡¡} | dtjtjfk�r¨d} ˆ|| | ƒ�qfW5QRXdS) Nrz3A simple command-line interface for zipfile module.)Ú descriptionT)Zrequiredz-lz--listú zShow listing of a zipfile)ÚmetavarÚhelpz-ez --extractr)r4z zExtract zipfile into target dir)Únargsr5r6z-cz--createú+)zzzCreate zipfile from sourcesz-tz--testzTest if a zipfile is validr^z.The following enclosed file is corrupted: {!r}z Done testingcsptj |¡r| ||t¡nPtj |¡rl|r8| ||¡tt |¡ƒD]$}ˆ|tj ||¡tj ||¡ƒqFdSrà) ryr»rérrr�rërìr2)rVr»ÚzippathZnm©ÚaddToZiprrr;s s    ÿzmain..addToZipr_r„)ÚargparseÚArgumentParserZadd_mutually_exclusive_groupÚ add_argumentÚ parse_argsZtestr r˜r|rÿr^r–r¶r¸ZcreateÚpopryr»rñrÉrÇrÈ) r!r<r3ÚparserÚgroupr×rVZbadfilerÇZzip_nameÚfilesr»r9rr:rÚmainK s\   ÿ þ þ ÿ             rDÚ__main__)N)N)�rZbinasciirÚimportlib.utilrür3rryrrÍrˆrFr}ror¸rrörÐÚ ImportErrorrøråÚ__all__Ú Exceptionrr rrr�rÔr¡rrrrrr“r”r•r‰r]r\r’r[rLrMrNrOrPrQrRrar}r~r�rƒr€r‚Z_CD_CREATE_VERSIONZ_CD_CREATE_SYSTEMZ_CD_EXTRACT_VERSIONZ_CD_EXTRACT_SYSTEMZ _CD_FLAG_BITSZ_CD_COMPRESS_TYPEZ_CD_TIMEZ_CD_DATEZ_CD_CRCZ_CD_COMPRESSED_SIZEZ_CD_UNCOMPRESSED_SIZEr„r†r‡Z_CD_DISK_NUMBER_STARTZ_CD_INTERNAL_FILE_ATTRIBUTESZ_CD_EXTERNAL_FILE_ATTRIBUTESrˆr—r˜r«r¬Z_FH_EXTRACT_VERSIONZ_FH_EXTRACT_SYSTEMr¯Z_FH_COMPRESSION_METHODZ_FH_LAST_MOD_TIMEZ_FH_LAST_MOD_DATEZ_FH_CRCZ_FH_COMPRESSED_SIZEZ_FH_UNCOMPRESSED_SIZEr­r®rGrHrErJrKrIZ_CD64_SIGNATUREZ_CD64_DIRECTORY_RECSIZEZ_CD64_CREATE_VERSIONZ_CD64_EXTRACT_VERSIONZ_CD64_DISK_NUMBERZ_CD64_DISK_NUMBER_STARTZ_CD64_NUMBER_ENTRIES_THIS_DISKZ_CD64_NUMBER_ENTRIES_TOTALZ_CD64_DIRECTORY_SIZEZ_CD64_OFFSET_START_CENTDIRrYZStructr.r8r=r rXr9Úobjectr rÚrÌrÞrßrìr†rûrþrÿrrr4rrNr r rrÚdictÚfromkeysr r r rrrDrrrrrÚsl      ý       +=q&ï &AN/2 =