title: nodejs write 64bit unsigned integer to buffer
body: <p>I want to store a 64bit (8 byte) big integer to a nodejs buffer object in big endian format.</p>
  
  <p>The problem about this task is that nodejs buffer only supports writing 32bit integers as maximum (with buf.write32UInt32BE(value, offset)). So I thought, why can't we just split the 64bit integer?</p>
  
  <pre><code>var buf = new Buffer(8);
  
  buf.fill(0) // clear all bytes of the buffer
  console.log(buf); // outputs &lt;Buffer 00 00 00 00 00 00 00 00&gt;
  
  var int = 0xffff; // as dezimal: 65535
  
  buf.write32UInt32BE(0xff, 4); // right the first part of the int
  console.log(buf); // outputs &lt;Buffer 00 00 00 00 00 00 00 ff&gt;
  
  buf.write32UInt32BE(0xff, 0); // right the second part of the int
  console.log(buf); // outputs &lt;Buffer 00 00 00 ff 00 00 00 ff&gt;
  
  var bufInt = buf.read32UInt32BE(0) * buf.read32UInt32BE(4);
  console.log(bufInt); // outputs 65025
  </code></pre>
  
  <p>As you see this nearly works. The problem is just splitting the 64bit integer and finding the missing 510 at reading it. Would somebody mind showing the solutions for these two issues?</p>