Skip to content

Instantly share code, notes, and snippets.

@KwanEsq
Created October 9, 2017 21:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KwanEsq/c5f6a460da51524ee83dba0a9b15093c to your computer and use it in GitHub Desktop.
Save KwanEsq/c5f6a460da51524ee83dba0a9b15093c to your computer and use it in GitHub Desktop.
Decompress mozlz4 in Firefox's browser console
/* 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)
}
@KwanEsq
Copy link
Author

KwanEsq commented Jul 13, 2018

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

@KwanEsq
Copy link
Author

KwanEsq commented Apr 9, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment