0

Is there any way to extract ZIP files that use bzip2 compression in Python 2?

The native ZipFile module doesn't support bzip compression (12). Any way around it or an alternative method?

Xyand
  • 4,470
  • 4
  • 36
  • 63

1 Answers1

0

The bz2 module supports exactly that. You can read more about it here. Please do search the web before asking simple questions.

Isdj
  • 1,835
  • 1
  • 18
  • 36
  • 1
    The question being asked was how to extract data from a zip file where bzip2 compression is used - the page you've referenced is only concerned with bzip2 compression. It doesn't address the zip file aspect. A quick look at the zipfile docs (https://docs.python.org/2/library/zipfile.html) seems to suggest that the interface only supports deflate & store. Don't see anything about bzip2 support. – pmqs May 30 '17 at 21:27