ZIP file
A single compressed file that bundles many files and folders together, usually ending in .zip.
In more detail
The ZIP format stores each file compressed along with a directory listing the contents, and many other formats are ZIP archives underneath, including Office documents such as .docx and Java .jar files. Extract, or unzip, an archive before running anything in it: a program opened from inside a ZIP file often cannot find the files next to it. A password-protected ZIP can hide its contents from scanners that inspect data leaving the network. Python's zipfile module reads and writes these archives.
Examples
with zipfile.ZipFile(path, "w") as z:stamp("pricing-2027.docx", "Confidential") # a .docx is a ZIP of XML partsRelated terms
- DOCX — The standard file format for Microsoft Word documents, which is really a zip archive containing XML files for the text, styles and properties.
- custom document properties — User- or tool-defined name and value pairs stored inside an Office document, kept in a part called docProps/custom.xml.
- XML — A text format that stores structured data as nested elements marked with tags in angle brackets, readable by both people and programs.
- DLP — Data loss prevention: tools that watch for sensitive data leaving an organisation, such as customer records sent to a personal address.
- zipfile — The standard library module for reading, creating and extracting ZIP archives.
- examples folder — The folder of sample programs downloaded for the course, which you run and change as you learn.
Taught in
- Data Classification Schemes & Sensitivity Labeling — Cybersecurity Fundamentals, GRC & Cryptography
- Data Loss Prevention & Egress Monitoring — Cybersecurity Fundamentals, GRC & Cryptography
- Installing Python On Windows — Hands-on Python: Complete Video Course & Book
- Where Python Lives: PATH And Versions — Hands-on Python: Complete Video Course & Book
- Your Python Folder And A First Program — Hands-on Python: Complete Video Course & Book
- Iterators And Generators — Hands-on Python: Complete Video Course & Book