compressing
可以很便捷的压缩与解压文件与目录!
配合
archive
强大压缩能力, 能解决不少问题
使用方式: 压缩与解压
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
const compressing = require('compressing'); // compress a file compressing.gzip.compressFile('file/path/to/compress', 'path/to/destination.gz') .then(compressDone) .catch(handleError); // compress a file buffer compressing.gzip.compressFile(buffer, 'path/to/destination.gz') .then(compressDone) .catch(handleError); // compress a stream compressing.gzip.compressFile(stream, 'path/to/destination.gz') .then(compressDone) .catch(handleError); |