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

@types/pako

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/pako

TypeScript definitions for pako

  • 1.0.3
  • ts3.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2M
decreased by-21.45%
Maintainers
1
Weekly downloads
 
Created

What is @types/pako?

@types/pako provides TypeScript type definitions for the pako library, which is a fast and efficient zlib port to JavaScript, primarily used for data compression and decompression.

What are @types/pako's main functionalities?

Compression

This feature allows you to compress a string using the deflate algorithm. The code sample demonstrates how to compress a simple string and output the compressed result.

const pako = require('pako');
const input = 'Hello, world!';
const compressed = pako.deflate(input, { to: 'string' });
console.log(compressed);

Decompression

This feature allows you to decompress a previously compressed string using the inflate algorithm. The code sample shows how to decompress a base64 encoded compressed string and output the original string.

const pako = require('pako');
const compressed = 'eJzT0yMAAGTvBe8=';
const decompressed = pako.inflate(compressed, { to: 'string' });
console.log(decompressed);

Gzip Compression

This feature allows you to compress a string using the gzip algorithm. The code sample demonstrates how to gzip compress a simple string and output the compressed result.

const pako = require('pako');
const input = 'Hello, world!';
const compressed = pako.gzip(input, { to: 'string' });
console.log(compressed);

Gzip Decompression

This feature allows you to decompress a previously gzip compressed string using the ungzip algorithm. The code sample shows how to ungzip decompress a base64 encoded compressed string and output the original string.

const pako = require('pako');
const compressed = 'H4sIAAAAAAAAE8tIzcnJVyjPL8pJAQCFE0oNCwAAAA==';
const decompressed = pako.ungzip(compressed, { to: 'string' });
console.log(decompressed);

Other packages similar to @types/pako

FAQs

Package last updated on 24 Dec 2021

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