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
#!/usr/bin/python | |
# Command-line tool to decompress mozLz4 files used for example by Firefox to store various kinds of session backup information. | |
# Works in both Python 2.7.15 and 3.6.7, as of version 2.1.6 of the LZ4 Python bindings at pypi.org/project/lz4. | |
# To use in another script, simply cut and paste the import statement and the mozlz4_to_text() function (lines 8 to 17). | |
import lz4.block # pip install lz4 --user | |
def mozlz4_to_text(filepath): | |
# Given the path to a "mozlz4", "jsonlz4", "baklz4" etc. file, |