Create a zip file from a list of selected files and make the zipped file downloadable in Drupal 8
Use the ArchiverManager and get the instance by calling the getInstance() method. A Zip class is returned. The Drupal Zip class uses PHP's ZipArchive class to perform the heavy lifting.

Example (edited after remark @Clive):

$file = \Drupal\file\Entity\File::load($fileId);
$fileUri = \Drupal::service('file_system')-&gt;realpath($file-&gt;getFileUri());

$zip = \Drupal::service('plugin.manager.archiver')-&gt;getInstance(['f‌​ilepath' =&gt; '/foo/bar.zip']);
$zip-&gt;add($fileUri);