code: function isBinary(buffer) {
    var chunk = buffer.toString('utf8', 0, Math.min(buffer.length, 24));
    for (var i in chunk) {
      var charCode = chunk.charCodeAt(i);
      if (charCode == 65533 || charCode <= 8) {
        return true;
      }
    }
    return false;
  }
docs: Helper function that detects whether a buffer is binary or utf8.
  @param {Buffer} buffer
  @returns {boolean}