Created
October 9, 2017 21:16
-
-
Save KwanEsq/c5f6a460da51524ee83dba0a9b15093c to your computer and use it in GitHub Desktop.
Decompress mozlz4 in Firefox's browser console
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
/* Any copyright is dedicated to the Public Domain. | |
http://creativecommons.org/publicdomain/zero/1.0/ */ | |
/** | |
* Paste the function into the browser console then call | |
* deMozLz4(${path/to/file}) | |
*/ | |
async function deMozLz4(path) { | |
const src = await OS.File.read(path, {compression: "lz4"}); | |
await OS.File.writeAtomic(`${path}.out`, src) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Want to do it in python? (from a Firefox dev, recommended)
https://gist.github.com/kmaglione/823aa149dcc6103b6348bd5117914105
Want to do it in C?
https://github.com/andikleen/lz4json