How to unzip or uncompress a file .epub on Drupal?
PHP already has a built in class to process zip files. You can combine that with a hook_node_presave invocation in a custom module to process the field containing your ePub file and extract it to a directory in your file system.

/**
 * Implements hook_node_presave().
 */
function MYMODULE_node_presave($node) {
  if(isset($node-&gt;field_MYFIELD[LANGUAGE_NONE][0]['fid'])) {
    $file = file_load($node-&gt;field_sss[LANGUAGE_NONE][0]['fid']);
    $file_path = drupal_realpath($file-&gt;uri);
    $file_name = pathinfo($file_path, PATHINFO_FILENAME);
    $zip = new ZipArchive;
    if ($zip-&gt;open($file_path)) {
      $zip-&gt;extractTo(drupal_realpath("public://MYMODULE_customdir/$file_name"));
      $zip-&gt;close();
    }
  }
}