3

Is it possible to monitor/report compression progress for zipfile.ZipFile()?

I found an explanation for how to monitor extraction progress here, but I guess a solution for compression must be a bit different.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Vasily
  • 2,192
  • 4
  • 22
  • 33
  • 1
    There is an answer [here](http://stackoverflow.com/q/28522669/11722), but it will only report on a file level. If there is only one file it would not help ( I am also looking for a solution that works when zipping single big files ). – Zitrax Jan 15 '17 at 16:53
  • 1
    I added an [answer](http://stackoverflow.com/a/41664456/11722) to the other question with a possible solution. – Zitrax Jan 15 '17 at 18:05
  • 2
    The problem is connected to the fact that the ZIP API in Python is bad. It lacks what Java has been supporting for decades. You cannot write binary data to a file inside a ZIP directly. You can only pass a file to be added. There is no callback that provides the progress. – Sven Jun 26 '19 at 08:36
  • Since we can use C in python, why don't anyone make a C level zip tool in Pip – Ratul Hasan Sep 21 '22 at 17:52

0 Answers0