code: function encode (data, buffer, offset) {
    var buffers = []
    var result = null
  
    encode._encode(buffers, data)
    result = Buffer.concat(buffers)
    encode.bytes = result.length
  
    if (Buffer.isBuffer(buffer)) {
      result.copy(buffer, offset)
      return buffer
    }
  
    return result
  }
docs: Encodes data in bencode.
  
  @param  {Buffer|Array|String|Object|Number|Boolean} data
  @return {Buffer}