我不知道如何解压缩具有tar.zst扩展名的文件,即使我确实在互联网上寻找解决方案,我最终也没有任何有用的事情。
扩展名.zstd表示存档由zstd压缩。
tar命令有一个选项-I( - use-compress-program)来指定压缩/解压缩命令。
您可以按如下方式使用它。
$ tar -I zstd -xvf archive.tar.zst
下载库
https://pypi.org/project/zstandard/
蟒蛇
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)