I can use gzip
to compress a single file, but I can not use it to compress a folder. I used this:
tar = tarfile.open("TarName.tar.gz", "w:gz")
tar.add("folder/location", arcname="TarName")
tar.close()
The folder was compressed, how can I uncompress it? Or is there any other methods to compress a folder? By the way, please add the way to uncompress. Thanks very much