可以创建.tar.gz自动提取程序吗? [英] Possible to create .tar.gz auto - extractor ?

查看:118
本文介绍了可以创建.tar.gz自动提取程序吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在尝试在php脚本上压缩包含大约700个wave文件的目录.
到目前为止,我已经尝试使用php创建.zip,但似乎此方法花费的时间太长.〜2min +

然后我继续尝试(〜1分钟):

Hi,

i''m trying to do compression of a directory containing about 700 wave files on a php script.
So far i have tried using php to create .zip, but seems this method takes a bit too long.~2min+

I then proceeded to try (~1min):

exec( "tar cf $archive $directory");
exec( "gzip $archive");



我以为使用系统命令应该比php库快?

无论如何,对我而言,在Webhost服务上使用最快的压缩方法是什么?

是否可以使用.tar.gz文件创建自动提取程序?
如果我可以足够快的速度创建.zip文件,则不需要自动提取程序,因为Windows和Mac OS广泛支持.zip.否则,如果用户必须安装其他应用程序(如7-zip)来解压缩我的.tar.gz文件,则.tar.gz给用户带来了额外的步骤.

我的虚拟主机运行Linux,Apache.

非常感谢!
Brian



I kind of assumed that using system commands should be faster than php library?

Anyway, what is the fastest compression method for me to use on my webhost service?

And is it possible to create an auto-extractor with .tar.gz files?
If i could create .zip files fast enough, I would not need an auto extractor as .zip is widely supported on windows and mac os. Otherwise .tar.gz poses an extra step for users if they had to install another application like 7-zip to uncompress my .tar.gz file.

My webhost runs linux, Apache.

Many Thanks!
Brian

推荐答案

archive


目录"); exec("gzip
directory"); exec( "gzip


archive");
archive");



我以为使用系统命令应该比php库快?

无论如何,对我而言,在Webhost服务上使用最快的压缩方法是什么?

是否可以使用.tar.gz文件创建自动提取程序?
如果我可以足够快的速度创建.zip文件,则不需要自动提取程序,因为Windows和Mac OS广泛支持.zip.否则,如果用户必须安装其他应用程序(如7-zip)来解压缩我的.tar.gz文件,则.tar.gz给用户带来了额外的步骤.

我的虚拟主机运行Linux,Apache.

非常感谢!
布莱恩



I kind of assumed that using system commands should be faster than php library?

Anyway, what is the fastest compression method for me to use on my webhost service?

And is it possible to create an auto-extractor with .tar.gz files?
If i could create .zip files fast enough, I would not need an auto extractor as .zip is widely supported on windows and mac os. Otherwise .tar.gz poses an extra step for users if they had to install another application like 7-zip to uncompress my .tar.gz file.

My webhost runs linux, Apache.

Many Thanks!
Brian


这篇关于可以创建.tar.gz自动提取程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆