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!
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.