java压缩最好的方法,使用Coldfusion或Java压缩文件的最有效方法

I'm looking for the most memory efficient way to zip many large files using ColdFusion or Java. I have tried using and using zip.cfc by Nate Nielsen (http://farmancreative.com/womenskiteboarding/admin/dccom/components/dcFileManagerV3/actions/cfc/zip.cfc). For the tests I zipped up a directory that contains 80 mp4 files totaling 1.18GB. The results are below. I could not tell a difference at all when the tag was running, the normal "steps" of ColdFusion appeared unchanged. But with zip.cfc it was more "saw tooth" memory usage.

So my question is, which is the better result? Or is there another newer way that I don't know about that is better than both of these?

I care more about memory usage than speed. But as far as speed goes, was a little faster. time was 100,871. zip.cfc time was 141,285.

Thanks!

tdMIw.jpg

Test Code:

action="zip"

source="#dir#"

file="#zipFile#"

storepath="false"

overwrite="true"

/>

Script Time: #scriptTime#

zip.cfc Test Code:

zipper.newZip(zipFile);

zipper.createZip();

Script Time: #scriptTime#

解决方案

I have to run so can't type much right now but will come back to this tomorrow. Here are my test results after running it against real world file types (.txt, .ppt, .doc, .swf, etc...). Looks like is much better than zip.cfc.

gx51N.jpg

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值