zipdata

gzip

Usage no npm install needed!

<script type="module">
  import zipdata from 'https://cdn.skypack.dev/zipdata';
</script>

README

十分简单的gzip压缩模块

安装


npm i zipdata

使用


const zipdata = require('zipdata');

zipdata('./file.txt')
    .then(data => {
        //do something
    }).catch(err => {
        // handle error
    });

//在async声明的函数中,直接使用await.

;(async () => {

    try {
        let data = await zipdata('./a.js');
    } catch (err) {
        //...
    }

})();