npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

node-lzma7z

v0.1.2

Published

Create password-protected and split 7z archives using LZMA SDK 26.00 (N-API native addon)

Readme

node-lzma7z

Create 7z archives with optional AES password protection, header encryption, split volumes, and configurable LZMA compression level, via an N-API native addon built from LZMA SDK 26.00 (7-Zip reduced variant).

Requirements

  • Node.js ≥ 18
  • node-gyp build toolchain: Python 3, a C++ compiler (GCC/Clang on Linux/macOS, MSVC on Windows), and make where applicable

npm install runs node-gyp rebuild automatically.

Install

npm install node-lzma7z

API

compress7z(options, callback)

Asynchronous compression. callback receives (err).

compress7zSync(options)

Synchronous compression; throws on failure.

Options (Compress7zOptions)

| Property | Type | Description | |----------|------|-------------| | outputPath | string | Path for the .7z file. For split archives, volume names are derived from this path (e.g. out.7z.001, out.7z.002). | | inputs | string[] | Files and/or directories to add; directories are included recursively. | | password | string (optional) | If set, the archive is encrypted with AES. | | encryptHeaders | boolean (optional) | When used with password, enables header encryption (-mhe=on). | | compressionLevel | number (optional) | 09; default 5. | | volumeSizeBytes | number (optional) | If > 0, splits output into volumes of that size in bytes (last volume may be smaller). |

Example

const { compress7z, compress7zSync } = require('node-lzma7z');
const path = require('path');

// Async
compress7z(
  {
    outputPath: path.join(__dirname, 'backup.7z'),
    inputs: [path.join(__dirname, 'data')],
    password: 'your-secret',
    encryptHeaders: true,
    compressionLevel: 7,
    volumeSizeBytes: 10 * 1024 * 1024, // 10 MiB per volume
  },
  (err) => {
    if (err) throw err;
    console.log('done');
  }
);

// Sync
compress7zSync({
  outputPath: '/tmp/out.7z',
  inputs: ['/tmp/file1.txt', '/tmp/file2.txt'],
});

TypeScript

Types are published in index.d.ts (Compress7zOptions, compress7z, compress7zSync).

Test

npm test

The test builds a small encrypted, split archive and optionally verifies listing with 7z or 7zz if present on PATH.

License

See package.json (Unlicense). The bundled LZMA / 7-Zip sources follow their respective licenses in the SDK tree.