ctalkington/node-zipstream — pull request #1 by niknah (2012-09-17 14:49:20+00:00)
Title: 100% cpu usage fix + additional tests for code coverage.

Thanks for continuing support of this module.

Run the below sample with...

node example.js &
top

The cpu is 100% when it's just waiting around.

```javascript

var fs = require('fs');

var zipstream = require('./zipstream');

var out = fs.createWriteStream('out.zip');
var zip = zipstream.createZip({ level: 1 });

zip.pipe(out);

zip.addFile(fs.createReadStream('zipstream.js'), { name: 'file1.js' }, function() {
console.error('waiting...');

setTimeout(function() {
zip.addFile(fs.createReadStream('zipstream.js'), { name: 'file2.js' }, function() {
zip.finalize(function(written) { console.log(written + ' total bytes written'); });
});
},15000);

});

```