Skip to content

Instantly share code, notes, and snippets.

@peterfication
Created November 27, 2016 10:17
Show Gist options
  • Save peterfication/0858da5db02322321101d8c7330b89e7 to your computer and use it in GitHub Desktop.
Save peterfication/0858da5db02322321101d8c7330b89e7 to your computer and use it in GitHub Desktop.
Decode body response created by https://github.com/flickr/yakbak
var zlib = require('zlib');
var gunzip = zlib.createGunzip();
var buf1 = new Buffer("...", "base64")
var buf2 = new Buffer("...", "base64")
var buf3 = new Buffer("...", "base64")
var buf = Buffer.concat([buf1, buf2, buf3])
zlib.gunzip(buf, function(err, dezipped) {
console.log(dezipped.toString())
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment