/nodejs.zeep

zip/unzip API based on 7-Zip

Primary LanguageJavaScript

zeep

zip/unzip API based on 7-Zip

If links in this document not avaiable, please access README on GitHub directly.

Description

It is really difficult to find a module which is written in pure Node.js and offers zip/unzip perfectly.

Table of Contents

Get Started

const zeep = require('zeep');

// Create an archive (.zip) containing only one file.
zeep.zip(archive_path, file_path);

// Create an archive (.zip) containing the whole folder.
zeep.zip(archive_path, folder_path);
 
// Create an archive (.zip) containing children of the folder.
// The folder itself is ignored.
zeep.zip(archive_path, folder_path, { name: '.' });

// Extract from an archive (.zip) and put files / directories under specified output_path.
zeep.unzip(archive_path, output_path);

// Get all entry names stored in an archive.
let names = zeep.getEntryNames(archive_path);

Links

References