I'm trying to test this, but it simply is not working. From the node-appc folder, I run "node", then run the following JavaScript:

    var zip = require('./lib/appc').zip;
    zip.zip('~/Desktop/myfile.txt', '~/Desktop/test.zip', function (err) {
        if (err) {
            console.error('ERROR!');
            console.error(err);
        } else {
            console.log('success!');
        }
    });

It always returns success because sometimes stderr is empty. Even working around this, I run into more problems. That code above returns an error code of 15 (Zip could not open an output file (typically the archive) for writing). This is due to zip for some reason not being able to understand the ~, so that means you need to make the result path absolute near the top of the zip() function:

    result = afs.resolvePath(result);