How can I decompress an archive file having tar.zs

2020-02-27 00:58发布

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.

4条回答
虎瘦雄心在
2楼-- · 2020-02-27 01:24

The extention .zst means that the archive is compressed by 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

查看更多
淡お忘
3楼-- · 2020-02-27 01:33

Decompress it in Terminal.

unzstd yourfilename.zst

I know there aren't many resources available but I found this here: http://manpages.org/zstd

查看更多
干净又极端
4楼-- · 2020-02-27 01:34

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
查看更多
Animai°情兽
5楼-- · 2020-02-27 01:45

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)
查看更多
登录 后发表回答