title: Parsing a gzip stream in Nodejs
body: <p>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</p>
  
  <pre><code>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());
  }
  });
  </code></pre>
  
  <p>Why is that whenever I receive a gz stream the data size is ~200 bytes smaller than the sent gz stream?</p>