1.0.2 • Published 8 months ago

@musicslayer/zip v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

zip

Quick and easy nodejs functions to work with zip files.

This combines "node-compress-commons" and "buffer-crc32" to provide streamlined zip/unzip functionality that does not require any external modules.

https://github.com/archiverjs/node-compress-commons

https://github.com/brianloveswords/buffer-crc32

Installation Instructions

Package available on NPM.

> npm install @musicslayer/zip

Example Usage

Refer to example.js to see an example usage of each function in the API.

API

Zip.createZipFileFromFolder(zipFilePath, srcFolder, compressionLevel)

Creates a zip file containing a folder and all of its content. Compression level is an integer 0-9 refering to the zlib compression level:

0 = No compression 1 = Fastest Compression ... 9 = Maximum Compression

Unzip.extractZipFileIntoFolder(zipFilePath, destFolder)

Extracts a zip file, writing all of its contents into a specified folder.

Unzip.readZipFile(zipFilePath)

Reads data from a zip file, returning a Map of file names to each file's information and uncompressed contents. This will not extract any files.

1.0.2

8 months ago

1.0.1

1 year ago

1.0.0

1 year ago