Created
August 15, 2017 18:01
-
-
Save kmaglione/ab03d52c17deddc29bea48756e04cf40 to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env python | |
import io | |
import sys | |
import lz4 | |
MAGIC = b'mozLz40\0' | |
for path in sys.argv[1:]: | |
with io.open(path, 'rb') as f: | |
magic = f.read(len(MAGIC)) | |
if magic != MAGIC: | |
raise Exception('Bad magic number') | |
print(lz4.decompress(f.read()).decode("utf-8")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment