<commit_before>:mod:`zipfile` --- Work with ZIP archives
=========================================

.. module:: zipfile
   :synopsis: Read and write ZIP-format archive files.
.. moduleauthor:: <NAME> <<EMAIL>>
.. sectionauthor:: <NAME> <<EMAIL>>

The ZIP file format is a common archive and compression standard. This module
provides tools to create, read, write, append, and list a ZIP file.  Any
advanced use of this module will require an understanding of the format, as
defined in `PKZIP Application Note
<http://www.pkware.com/documents/casestudies/APPNOTE.TXT>`_.

This module does not currently handle multi-disk ZIP files.
It can handle ZIP files that use the ZIP64 extensions
(that is ZIP files that are more than 4 GByte in size).  It supports
decryption of encrypted files in ZIP archives, but it currently cannot
create an encrypted file.  Decryption is extremely slow as it is
implemented in native Python rather than C.

For other archive formats, see the :mod:`bz2`, :mod:`gzip`, and
:mod:`tarfile` modules.

The module defines the following items:

.. exception:: BadZipFile

   The error raised for bad ZIP files (old name: ``zipfile.error``).

   .. versionadded:: 3.2


.. exception:: BadZipfile

   This is an alias for :exc:`BadZipFile` that exists for compatibility with
   Python versions prior to 3.2.  Usage is deprecated.


.. exception:: LargeZipFile

   The error raised when a ZIP file would require ZIP64 functionality but that has
   not been enabled.


.. class:: ZipFile

   The class for reading and writing ZIP files.  See section
   :ref:`zipfile-objects` for constructor details.


.. class:: PyZipFile

   Class for creating ZIP archives containing Python libraries.


.. class:: ZipInfo(filename='NoName', date_time=(1980,1,1,0,0,0))

   Class used to represent information about a member of an archive. Instances<commit_msg>#10008: Fix duplicate index entry.<commit_after>:mod:`zipfile` --- Work with ZIP archives
=========================================

.. module:: zipfile
   :synopsis: Read and write ZIP-format archive files.
.. moduleauthor:: <NAME> <<EMAIL>>
.. sectionauthor:: <NAME> <<EMAIL>>

The ZIP file format is a common archive and compression standard. This module
provides tools to create, read, write, append, and list a ZIP file.  Any
advanced use of this module will require an understanding of the format, as
defined in `PKZIP Application Note
<http://www.pkware.com/documents/casestudies/APPNOTE.TXT>`_.

This module does not currently handle multi-disk ZIP files.
It can handle ZIP files that use the ZIP64 extensions
(that is ZIP files that are more than 4 GByte in size).  It supports
decryption of encrypted files in ZIP archives, but it currently cannot
create an encrypted file.  Decryption is extremely slow as it is
implemented in native Python rather than C.

For other archive formats, see the :mod:`bz2`, :mod:`gzip`, and
:mod:`tarfile` modules.

The module defines the following items:

.. exception:: BadZipFile

   The error raised for bad ZIP files (old name: ``zipfile.error``).

   .. versionadded:: 3.2


.. exception:: BadZipfile

   This is an alias for :exc:`BadZipFile` that exists for compatibility with
   Python versions prior to 3.2.  Usage is deprecated.


.. exception:: LargeZipFile

   The error raised when a ZIP file would require ZIP64 functionality but that has
   not been enabled.


.. class:: ZipFile
   :noindex:

   The class for reading and writing ZIP files.  See section
   :ref:`zipfile-objects` for constructor details.


.. class:: PyZipFile

   Class for creating ZIP archives containing Python libraries.


.. class:: ZipInfo(filename='NoName', date_time=(1980,1,1,0,0,0))

   Class used to represent information about a member of an archive. Instances
{'fraction_non_alphanumeric': 0.10446570972886762, 'fraction_numerical': 0.011430090377458799, 'mean_word_length': 4.085135135135135, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2189991', 'n_tokens_mistral': 1099, 'n_tokens_neox': 1013, 'n_words': 484}