0.9.0 • Published 2 years ago

@victorykit/unizip v0.9.0

Weekly downloads
-
License
GPL-3.0-or-later
Repository
-
Last release
2 years ago

victorykit/unizip

A uniform utility for creating ZIP archives via NodeJS through Info-Zip, or AdmZip.

Both will result in the roughly same output and share the same interface, however the compression rate may differ...

Javascript

#!/usr/bin/env node

const unizip = require( '@victorykit/unizip' );

//uses InfoZip - archives node_modules directory with a `nodejs` path prefix
var archive = new unizip.InfoZipArchive( 'test.zip' );
archive.add( 'node_modules/**/*', 'nodejs' ).close();

//uses AdmZip - archives node_modules directory with a `nodejs` path prefix
var archive2 = new zip.AdmZipArchive( 'test2.zip' );
archive2.add( 'node_modules/**/*', 'nodejs' )
archive2.close();

Shell Script (POSIX)

#!/bin/sh

#uses InfoZip
node lib/zip.js test.zip 'node_modules/**/*' -p 'nodejs' -a 'infozip'

#uses AdmZip
node lib/zip.js test.zip 'node_modules/**/*' -p 'nodejs' -a 'admzip'

#for help
node lib/zip.js --help
0.9.0

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.0

2 years ago