Created
July 6, 2022 18:41
-
-
Save chasemc/62a43ef0642e621dfa66796f565c140f to your computer and use it in GitHub Desktop.
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
import zstandard as zstd | |
def decompress_zstd(bytes_input): | |
dctx = zstd.ZstdDecompressor() | |
decompressed_domtblout = dctx.decompress(bytes_input) | |
return decompressed_domtblout.decode("utf-8").splitlines() | |
cctx = zstandard.ZstdCompressor() | |
compressed = cctx.compress(b"data to compress") | |
def test_decompress_zstd(): | |
assert decompress_zstd(compressed) == ["data to compress"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment