New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

isal-node

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

isal-node

Node.js bindings for Intel Storage Acceleration Library (ISA-L) compression

latest
Source
npmnpm
Version
0.1.2
Version published
Weekly downloads
1.9K
33.07%
Maintainers
1
Weekly downloads
 
Created
Source

isal-node

Node.js bindings for the Intel Storage Acceleration Library (ISA-L), providing high-performance compression and decompression for GZIP, DEFLATE, and ZLIB formats.

I built this largely with the help of claude-code.

Installation

npm install isal-node

The package automatically detects your platform and either:

  • Uses a pre-built binary (no compilation needed)
  • Falls back to building from source (if no pre-built binary available)

Supported Platforms (Pre-built Binaries)

  • macOS ARM64 (Apple Silicon)
  • Linux x86_64 (Intel/AMD 64-bit)
  • Linux ARM64 (ARM 64-bit)

Build Requirements (Fallback Only)

If no pre-built binary is available, the package will build from source. You'll need:

  • Rust toolchain (curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | sh)
  • Build tools for your platform:
    • macOS: Xcode command line tools (xcode-select --install)
    • Linux: build-essential package (sudo apt-get install build-essential)
    • Windows: Visual Studio Build Tools or Visual Studio Community

Usage

Synchronous API

const isal = require('isal-node');

// Simple compression/decompression
const data = Buffer.from('Hello, World!');

// GZIP (Node.js zlib compatible)
const gzipped = isal.gzip(data);
const ungzipped = isal.gunzip(gzipped);

// DEFLATE (Node.js zlib compatible)
const deflated = isal.deflate(data);
const inflated = isal.inflate(deflated);

// With Sync suffix (Node.js zlib compatible)
const gzippedSync = isal.gzipSync(data);
const ungzippedSync = isal.gunzipSync(gzippedSync);

// ZLIB (additional formats)
const compressed = isal.compress(data);
const decompressed = isal.decompress(compressed);

Asynchronous API (Non-blocking)

const isal = require('isal-node');

async function compressData() {
    const data = Buffer.from('Hello, World!');

    // GZIP (Node.js zlib compatible naming)
    const gzipped = await isal.gzipAsync(data);
    const ungzipped = await isal.gunzipAsync(gzipped);

    // DEFLATE (Node.js zlib compatible naming)
    const deflated = await isal.deflateAsync(data);
    const inflated = await isal.inflateAsync(deflated);

    // ZLIB (additional formats)
    const compressed = await isal.compressAsync(data);
    const decompressed = await isal.decompressAsync(compressed);
}

// Parallel compression for better performance
async function compressMultiple(dataArray) {
    const promises = dataArray.map(data => isal.gzipAsync(data));
    const compressed = await Promise.all(promises);
    return compressed;
}

API

Node.js zlib Compatible API

Sync:

  • gzip(input, options?) - Compress using GZIP
  • gunzip(input) - Decompress GZIP data
  • deflate(input, options?) - Compress using DEFLATE
  • inflate(input) - Decompress DEFLATE data
  • gzipSync(input, options?) - Compress using GZIP (explicit sync)
  • gunzipSync(input) - Decompress GZIP data (explicit sync)
  • deflateSync(input, options?) - Compress using DEFLATE (explicit sync)
  • inflateSync(input) - Decompress DEFLATE data (explicit sync)

Async:

  • gzipAsync(input, options?) - Compress using GZIP (async)
  • gunzipAsync(input) - Decompress GZIP data (async)
  • deflateAsync(input, options?) - Compress using DEFLATE (async)
  • inflateAsync(input) - Decompress DEFLATE data (async)

Additional Formats:

  • compress(input, options?) - Compress using ZLIB
  • decompress(input) - Decompress ZLIB data
  • compressAsync(input, options?) - Compress using ZLIB (async)
  • decompressAsync(input) - Decompress ZLIB data (async)

Options

  • level - Compression level (0, 1, or 3). Default: 3
    • 0: No compression (fastest)
    • 1: Fast compression
    • 3: Best compression

Building

npm install
npm run build

Testing

npm test        # Run synchronous tests
npm run test:async    # Run asynchronous tests  
npm run test:all      # Run all tests

Benchmarks

Run benchmarks to compare performance against Node.js built-in zlib:

  • npm run benchmark - Full benchmark with multiple data sizes and types
  • npm run benchmark:quick - Quick benchmark with smaller data sets
  • npm run benchmark:async - Async vs sync performance comparison

License

MIT

Keywords

compression

FAQs

Package last updated on 18 Jul 2025

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