MCPcopy Create free account
hub / github.com/idank/explainshell / decompress_zst

Function decompress_zst

tools/fetch_manned.py:94–104  ·  view source on GitHub ↗

Decompress a .zst file, returning the path to the decompressed file.

(zst_path)

Source from the content-addressed store, hash-verified

92
93
94def decompress_zst(zst_path):
95 """Decompress a .zst file, returning the path to the decompressed file."""
96 tsv_path = zst_path.removesuffix(".zst")
97 if os.path.exists(tsv_path):
98 logger.info("Already decompressed, skipping: %s", tsv_path)
99 return tsv_path
100 logger.info("Decompressing %s", zst_path)
101 result = subprocess.run(["zstd", "-d", "-k", zst_path])
102 if result.returncode != 0:
103 raise RuntimeError(f"Failed to decompress {zst_path}")
104 return tsv_path
105
106
107def parse_tsv(path):

Callers 1

cmd_extractFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected