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

iltorb

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iltorb

Brotli compression/decompression with native bindings

  • 2.4.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
60K
decreased by-53.42%
Maintainers
2
Weekly downloads
 
Created

What is iltorb?

The iltorb npm package is a Node.js binding for the Brotli compression algorithm, which is known for its high compression ratio and speed. It allows you to compress and decompress data using Brotli, making it useful for web applications, file storage, and data transfer.

What are iltorb's main functionalities?

Compression

This feature allows you to compress data using the Brotli algorithm. The code sample demonstrates how to compress a file named 'input.txt' and save the compressed output to 'output.txt.br'.

const iltorb = require('iltorb');
const fs = require('fs');

const input = fs.createReadStream('input.txt');
const output = fs.createWriteStream('output.txt.br');

input.pipe(iltorb.compressStream()).pipe(output);

Decompression

This feature allows you to decompress Brotli-compressed data. The code sample shows how to decompress a file named 'output.txt.br' and save the decompressed output to 'decompressed.txt'.

const iltorb = require('iltorb');
const fs = require('fs');

const input = fs.createReadStream('output.txt.br');
const output = fs.createWriteStream('decompressed.txt');

input.pipe(iltorb.decompressStream()).pipe(output);

Synchronous Compression

This feature provides a synchronous method to compress data. The code sample demonstrates how to read a file synchronously, compress its contents, and write the compressed data to a new file.

const iltorb = require('iltorb');
const fs = require('fs');

const input = fs.readFileSync('input.txt');
const compressed = iltorb.compressSync(input);
fs.writeFileSync('output.txt.br', compressed);

Synchronous Decompression

This feature provides a synchronous method to decompress data. The code sample shows how to read a compressed file synchronously, decompress its contents, and write the decompressed data to a new file.

const iltorb = require('iltorb');
const fs = require('fs');

const compressed = fs.readFileSync('output.txt.br');
const decompressed = iltorb.decompressSync(compressed);
fs.writeFileSync('decompressed.txt', decompressed);

Other packages similar to iltorb

Keywords

FAQs

Package last updated on 24 Apr 2019

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