Python zipfile module: difference between zipfile.ZIP_DEFLATED and zipfile.ZIP_STORED

maxim picture maxim · Mar 14, 2011 · Viewed 8.3k times · Source

I have difficult to understand the difference between zipfile.ZIP_DEFLATED and zipfile.ZIP_STORED compression modes of the zipfile module.

Someone could help me?

thanks,

Max

Answer

Adrien Plisson picture Adrien Plisson · Mar 14, 2011

ZIP_DEFLATED correspond to an archive member (a file inside the archive) which is compressed (or deflated). ZIP_STORED correspond to an archive member which is simply stored, without being compressed, quite the same as an archive member inside a tar file.