Skip to content

Instantly share code, notes, and snippets.

@stormslowly
Created May 12, 2015 01:08
Show Gist options
  • Save stormslowly/12d561679942f1d9cdac to your computer and use it in GitHub Desktop.
Save stormslowly/12d561679942f1d9cdac to your computer and use it in GitHub Desktop.
git object inflate
'use strict';
var zlib = require('zlib');
var fs = require('fs');
var fileName = process.argv[2];
var buffer = fs.readFileSync(fileName);
zlib.unzip(buffer, function(_, buf) {
// console.log(buf.toString('hex'));
console.log(buf.toString());
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment