title: How to decode a binary buffer to an image in node.js?
body: <p>I'm receiving an image in a binary stream as shown below, however when I try to create a buffer with the following data the buffer appears to be empty. Is the problem that buffer doesn't understand this format?  </p>
  
  <blockquote>
    <p>V�q)�EB\u001599!F":"����\u000b��3��5%�L�\u0018��pO^::�~��m�&lt;\u001e��L��k�%G�$b\u0003\u0011���=q�V=��A\u0018��O��U���m�B���\u00038�����0a�_��#\u001b����\f��(�3�\u0003���nGjr���Mt\�\u0014g����~�#�Q��
    g�K��s��@C��\u001cS�`\u000bps�Gnzq�Rg�\fu���C\u0015�\u001d3�E.BI\u0007���</p>
  </blockquote>
  
  <pre><code>var buffer = new Buffer(req.body, 'binary')
      console.log("BUFFER:" + buffer)
  fs.writeFile('test.jpg', buffer, function(err,written){
     if(err) console.log(err);
      else {
       console.log("Successfully written");
      }
  });
  </code></pre>