Python Zipfile Module - Introduction

Python Zipfile Module - Introduction


 What Is Zip File?

  • A file with the zip file extension is called a zip file.
  • ZIP is an archive file format that supports lossless data compression. A ZIP file may contain one or more files or directories that may have been compressed.
  • The ZIP file format permits several compression algorithms, though DEFLATE is
    the most common.
  • A ZIP file, like other archive file formats, is simply a collection of one or
    more files and/or folders but is compressed into a single file for easy
    transportation and compression.

 Advantages of .ZIP file:

  • You save storage space. Zipping large files can save up to 80 percent or more in hard disk space.
  • A smaller file size drastically reduces e-mail transmission time.
  • The smaller file size of e-mail messages that you want to keep is useful when your mailbox has a space limit.
  • Zipping allows you to encrypt private data, helpful when sending such data over the internet.

 The most common uses of ZIP files are listed below:

 Downloading Softwares

  • The most common use for ZIP files is for software downloads.
  • Zipping a software program saves storage space on the server, decreases the time it takes for you to download it to your computer, and keeps the hundreds or thousands of files nicely organized in a single ZIP file.

 Downloading And Sharing Photos

  • Instead of sending each image individually over email or saving each image one by one from a website, the sender can put the files in a ZIP archive so that only one file needs to be transferred.