Socket
Socket
Sign inDemoInstall

browserify-zlib

Package Overview
Dependencies
1
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    browserify-zlib

Full zlib module for browserify


Version published
Weekly downloads
12M
decreased by-0.96%
Maintainers
1
Install size
780 kB
Created
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

Emulates Node's zlib module for Browserify using pako. It uses the actual Node source code and passes the Node zlib tests by emulating the C++ binding that actually calls zlib.

browser support

node tests

Not implemented

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

  • The params method
  • The dictionary option

License

MIT

Keywords

FAQs

Last updated on 08 Apr 2014

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc