Compress & decompress folders

I want to compress and decompress folders.

There are libraries that can create zip files but cannot decompress because "is too complex for me".

I can gzip and gunzip with the zlib module and I can read tars but I've not found any library to create tars...

Can someone tell me how can I compress and decompress a folder? I don't care about the format.

This simples way is use external tar util:

var spawn = require('child_process').spawn;

var pathToArchive = './test.tar.gz';
var pathToFolder = './test';

var tar = spawn('tar', ['czf', pathToArchive, pathToFolder]);
tar.on('exit', function (code) {
        if (code === 0) {
                console.log('completed successfully');
        } else {
                console.log('error');
        }
});

Have you check that adm-zip and also similar question