Skip to content

Instantly share code, notes, and snippets.

@kleutzinger
Created December 6, 2023 09:28
Show Gist options
  • Save kleutzinger/7b9a0e0c5252dda8079db8c419f8c519 to your computer and use it in GitHub Desktop.
Save kleutzinger/7b9a0e0c5252dda8079db8c419f8c519 to your computer and use it in GitHub Desktop.
"""
decompress files.tar.zst to files.tar
"""
import zstandard as zstd
your_filename = "files.tar.zst"
with open(your_filename, "rb") as f:
data = f.read()
dctx = zstd.ZstdDecompressor()
decompressed = dctx.decompress(data, max_output_size=104857600)
with open("files.tar", "wb") as f:
f.write(decompressed)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment