Socket
Socket
Sign inDemoInstall

browserify-zlib

Package Overview
Dependencies
1
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Protect your apps from supply chain attacks

Install

browserify-zlib

Full zlib module for the browser

    0.2.0latest
    GitHub
    npm

Version published
Maintainers
2
Weekly downloads
12,399,982
increased by4.28%

Weekly downloads

Package description

What is browserify-zlib?

The browserify-zlib npm package is a JavaScript implementation of zlib for the browser. It uses the pako library under the hood and is designed to be used with Browserify. It allows you to compress and decompress data using the zlib library in a way that is compatible with browser environments.

What are browserify-zlib's main functionalities?

Compression

This feature allows you to compress data using deflate compression. The code sample demonstrates how to compress a string and encode it in base64.

var zlib = require('browserify-zlib');
var input = 'Hello World';
var compressed = zlib.deflateSync(input).toString('base64');
console.log(compressed);

Decompression

This feature allows you to decompress data that was compressed using deflate compression. The code sample demonstrates how to decode a base64 string and decompress it.

var zlib = require('browserify-zlib');
var compressed = 'eJzT0yMAAGTvBe8=';
var decompressed = zlib.inflateSync(Buffer.from(compressed, 'base64'));
console.log(decompressed.toString());

Other packages similar to browserify-zlib

Readme

Source

browserify-zlib

Travis CI Dependency Status js-standard-style

Description

Emulates Node's zlib module for the browser. Can be used as a drop in replacement with Browserify and webpack.

The heavy lifting is done using pako. The code in this module is modeled closely after the code in the source of Node core to get as much compatability as possible.

API

https://nodejs.org/api/zlib.html

Not implemented

The following options/methods are not supported because pako does not support them yet.

  • The params method

License

MIT

Keywords

FAQs

Last updated on 03 Jun 2017

Did you know?

Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc