docs: function formatValue(val, compressed) {
      var value = val;
  
      if (typeof val === 'number') {
          value = val.toString();
      } else if (Buffer.isBuffer(val)) {
          value = val.toString('binary');
      } else if (typeof val !== 'string') {
          value = JSON.stringify(val);
      }
  
      var bVal = new Buffer(value);
  
      var compression = Promise.resolve(bVal);
  
      if (compressed) {
          // Compress
          debug('compression enabled, compressing');
          compression = misc.compress(bVal);
      }
  
      return compression;
  }