Skip to content

Instantly share code, notes, and snippets.

@4poc
Created December 13, 2016 09:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 4poc/6c498949055e77c0f8bbdebef25be76b to your computer and use it in GitHub Desktop.
Save 4poc/6c498949055e77c0f8bbdebef25be76b to your computer and use it in GitHub Desktop.
import base64
import zlib
compressed = base64.b64encode(zlib.compress(decompressed))
const inflate = require('zlib').inflate;
const compressed = Buffer.from(data, 'base64');
inflate(compressed, function (err, decompressed) {
...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment