Skip to content

Instantly share code, notes, and snippets.

@eliask
Created June 9, 2018 21:38
Show Gist options
  • Save eliask/d43fc10fe2167bc3709a34dfbb80f8c4 to your computer and use it in GitHub Desktop.
Save eliask/d43fc10fe2167bc3709a34dfbb80f8c4 to your computer and use it in GitHub Desktop.
Using zstd in Python (decompression)
#
# pip install zstandard
#
# The zstandard bindings are a little off, compared to gzip, etc.
# So small tricks like this are needed to fully decompress a file in-memory:
dctx = zstd.ZstdDecompressor()
data = b''.join(dctx.read_to_iter(open('foo.zst', 'rb')))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment