private function extractFile(array $file)
    {
        $this->seek($file['offset']);

        $contents = $this->read($file['size']['compressed']);

        if ($file['flags'] & self::BZ2) {
            if (!$this->compression['bzip2']) {
                throw new RuntimeException(
                    "The \"bz2\" extension is required to decompress \"{$file['name']['data']}\"."
                );
            }

            $contents = bzdecompress($contents);
        } elseif ($file['flags'] & self::GZ) {
            if (!$this->compression['gzip']) {
                throw new RuntimeException(
                    "The \"zlib\" extension is required to decompress \"{$file['name']['data']}\"."
                );
            }

            $contents = gzinflate($contents);
        }

        return $contents;
    }