问题
I do not know how I can decompress a file having tar.zst extension and even though I did look for solutions on the Internet I ended up having nothing useful regarding the matter.
回答1:
The extention .zst means that the archive is compressed by zstd.
- https://github.com/facebook/zstd
The tar command has an option -I (--use-compress-program) to specify a command for compression/decompression.
You can use it as follows.
$ tar -I zstd -xvf archive.tar.zst
回答2:
Decompress it in Terminal.
unzstd yourfilename.zst
I know there aren't many resources available but I found this here: http://manpages.org/zstd
回答3:
If you have a standard cmake + gcc build stack:
git clone https://github.com/facebook/zstd.git
cd zstd/build/cmake
cmake .
make
./programs/zstd -d /path/to/file.zst
回答4:
Download the library
https://pypi.org/project/zstandard/
Python
import zstandard as zstd
...
...
...
...
elif filename_extension == ".zst":
dctx = zstd.ZstdDecompressor()
with open(submission_path_read, 'rb') as ifh, open(submission_path_save, 'wb') as ofh:
dctx.copy_stream(ifh, ofh, write_size=65536)
来源:https://stackoverflow.com/questions/45355277/how-can-i-decompress-an-archive-file-having-tar-zst