Last active
June 29, 2023 13:56
-
-
Save scivision/45ae4550b782b6d53c9342f7a376e559 to your computer and use it in GitHub Desktop.
Matlab extract .zst Zstd compressed files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function extract_zstd(archive, out_dir) | |
% extract a zstd file "archive" to "out_dir" | |
arguments | |
archive (1,1) string {mustBeFile} | |
out_dir (1,1) string {mustBeFolder} | |
end | |
tar_arc = tempname; | |
ret = system("zstd -d " + archive + " -o " + tar_arc); | |
assert(ret == 0, "problem extracting %s", archive) | |
untar(tar_arc, out_dir) | |
delete(tar_arc) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment