Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-gzip

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-gzip

Simply gzip and ungzip in Node.js with promises

  • 1.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
143K
increased by5.53%
Maintainers
1
Weekly downloads
 
Created

What is node-gzip?

The node-gzip package provides simple and efficient methods for compressing and decompressing data using the Gzip algorithm in Node.js applications.

What are node-gzip's main functionalities?

Compress Data

This feature allows you to compress a string or buffer using the Gzip algorithm. The code sample demonstrates how to compress a simple string 'Hello, World!' and log the compressed data.

const { gzip } = require('node-gzip');
const data = 'Hello, World!';

async function compressData() {
  const compressed = await gzip(data);
  console.log(compressed);
}

compressData();

Decompress Data

This feature allows you to decompress Gzip-compressed data back to its original form. The code sample shows how to decompress previously compressed data and log the decompressed string.

const { ungzip } = require('node-gzip');
const compressedData = /* some compressed data */;

async function decompressData() {
  const decompressed = await ungzip(compressedData);
  console.log(decompressed.toString());
}

decompressData();

Other packages similar to node-gzip

Keywords

FAQs

Package last updated on 24 Apr 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc