New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

base64zip

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

base64zip

A simple Node.js compress/decompress module

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

base64zip

node version NPM version build status Test coverage David deps npm download

This module encapsulates gzip compression and base64 encoding support.

中文说明

Install

$ npm i base64zip --save

Usage

'use strict';

const { gzip, ungzip } = require('base64zip');

let zipped = await gzip('some text');
let unzipped = await ungzip(zipped);

More usage can be found in test.js

gzip(data, options)

  • data can be a string or any serializable object
  • In addition to the options that come with Node.js, options also support the extended option base64.
  • The buffer is returned by default, but the base64 string is returned when options.base64 is true.

ungzip(data, options)

  • data should be a valid buffer or base64 string
  • In addition to the options that come with Node.js, options also support the extended option parse.
  • The buffer is returned by default, but the result of JSON.parse is returned when options.parse is true.

Unit tests

npm test

License

MIT
This README was translate by google

Keywords

gzip

FAQs

Package last updated on 23 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts