Created
June 9, 2018 21:38
-
-
Save eliask/d43fc10fe2167bc3709a34dfbb80f8c4 to your computer and use it in GitHub Desktop.
Using zstd in Python (decompression)
This file contains hidden or 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
# | |
# 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