Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

async-zip

An Asynchronous wrapper around ZLib

This module is a really simple wrapper around ZLib. A while back I needed to compress the body of a web-service request. At the time, I was trying understand promises and async/await functions and the compression libraries all seem to require callbacks to control the flow of code. I ended up wrapping the call to ZLib's inflate and deflate actions in an async function.

Installation

npm install async-zip

Example

const asyncZip = require('async-zip');

const inputString = "The string to compress";
const compressedString = await asyncZip.asyncCompressString(inputString);
const deCompressedString = await asyncZip.asyncDecompressString(compressedString);
console.log(deCompressedString.toString());

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages