Parsing a gzip stream in Nodejs

How can i unzip a gz stream in node.js? I am trying to parse a gz stream (a data file ) using MQTT . My code looks like

var mqtt = require('mqtt')
, client = mqtt.createClient('1883','mqttserver');
client.subscribe('MQTT/#');
client.on('message', function(topic,message) {
var zlib  = require('zlib');
zlib.gunzip(message, function(err,message ) {
if (!err) {
console.log(message.toString());
}
});

Please kindly help me ASAP since I am in middle of the implementation.

I have one more query why is that whenever I receive a gz stream the data size is ~200 bytes smaller than the sent gz stream.

Thanks

The issue is with the library itself. The default encoding is set to string 'utf-8' hence the some data is missed. Please take a look at this https://github.com/adamvr/MQTT.js/issues/109

Thanks for all you quick responses