0
How do I extract all content from a compressed file to the current directory? P.S.: The file has folders and files.
import libarchive
def unpack(file):
#?
0
How do I extract all content from a compressed file to the current directory? P.S.: The file has folders and files.
import libarchive
def unpack(file):
#?
1
Try to use Pylzma:
import pylzma
i = open(compressed_file, 'rb')
o = open(decompressed_file, 'wb')
s = pylzma.decompressobj()
while True:
tmp = i.read(1)
if not tmp: break
o.write(s.decompress(tmp))
o.close()
i.close()
Browser other questions tagged python
You are not signed in. Login or sign up in order to post.
what file format? what you tried?
– Rafael Barros