docs: function getFlag(val, compressed) {
      var flag = 0;
  
      if (typeof val === 'number') {
          flag = FLAG_NUMERIC;
      } else if (Buffer.isBuffer(val)) {
          flag = FLAG_BINARY;
      } else if (typeof val !== 'string') {
          flag = FLAG_JSON;
      }
  
      if (compressed === true) {
          flag = flag | FLAG_COMPRESSED;
      }
  
      return flag;
  }