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

minizlib

Package Overview
Dependencies
Maintainers
6
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minizlib

A small fast zlib stream built on [minipass](http://npm.im/minipass) and Node.js's zlib binding.

  • 3.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
21M
decreased by-15.03%
Maintainers
6
Weekly downloads
 
Created

What is minizlib?

The minizlib npm package is a minimal implementation of zlib bindings for Node.js, providing compression and decompression functionalities in a lightweight and efficient manner. It is designed to be faster and less memory-intensive than the native Node.js zlib module for certain use cases.

What are minizlib's main functionalities?

Compression

This feature allows you to compress data using the Deflate algorithm. The code sample demonstrates how to compress a simple string.

const { Deflate } = require('minizlib');
const input = Buffer.from('Hello World');
const deflate = new Deflate();
deflate.push(input, true); // true indicates this is the last chunk
if (deflate.err) { throw new Error(deflate.msg); }
const output = deflate.result;

Decompression

This feature enables you to decompress data that was compressed using the Deflate algorithm. The code sample shows how to decompress data to its original form.

const { Inflate } = require('minizlib');
const input = Buffer.from([/* Compressed data here */]);
const inflate = new Inflate();
inflate.push(input, true); // true indicates this is the last chunk
if (inflate.err) { throw new Error(inflate.msg); }
const output = inflate.result;

Other packages similar to minizlib

Keywords

FAQs

Package last updated on 06 Apr 2024

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