@ztwx/cm-zip
v1.0.5
Published
node zip compress and uncompress
Downloads
1
Readme
@ztwx/cm-zip
compress
uncompress
API
- zip compress
const {zip} =require("@ztwx/cm-zip");
zip("/xxx/inputDir","result.zip")
.then(()=>...)
.catch(()=>...)
- zip uncompress
const {unzip}=require("@ztwx/cm-zip");
unzip("xx/input.zip","outputDir")
.then(()=>...)
.catch(()=>...)
- zip progress
zip(INPUTDIR,OUTPUTZIP,filepath=>console.log(filepath))
unzip(INPUTZIP,OUTPUTDIR,filepath=>console.log(filepath))
cli
Global install first
npm install -g @ztwx/cm-zip
- To compress
cm-zip -c ${INPUT_DIR} ${OUTPUT_ZIP}
- To uncompress
cm-zip -x ${INPUT_ZIP} ${OUTPUT_DIR}