zip-to-tar
Convert zip archives to tar.
Global
zip-to-tar
could be installed globally and used as zip-to-tar
or zip2tar
:
npm i zip-to-tar -g
Usage
Convert all zip
archives to tar.gz
in same directory:
zip2tar *.zip
Make every program a filter
(c) Mike Gancarz: The UNIX Philosophy
Convert zip
data from stdin
and pipe it to stdout
.
cat arc.zip | zip2tar > arc.tar
Local
zip-to-tar
could be used localy. It will emit event on every file from converted archive.
Install
npm i zip-to-tar --save
API
zip-to-tar
can work with filename
and ReadableStream
. When filename
used zip-to-tar
can emit
progress of coverting (with options
: {progress: true}
).
zipToTar(filename, options)
filename
- string name of the fileoptions
- object with properties:progress
- whether emitprogress
event.
const zipToTar = ;const fs = ;const stdout = process;const onProgress = { stdout;}; const onFinish = { stdout;}; const onError = { console}; const tar = fs;const progress = true; ; ;
zipToTar(buffer)
buffer
- Buffer withzip
data.
const zipToTar = ;const fs = ;const stdout = process; const onProgress = { stdout;}; const onFinish = { stdout;}; const onError = { console}; const zip = fs;const tar = fs;const progress = true; ; ;
Related
- Jaguar - Pack and extract .tar.gz archives with emitter.
- OneZip - Pack and extract zip archives with emitter.
- tar-to-zip - Convert tar and tar.gz archives to zip.
License
MIT