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

zstdify-cli

v1.4.0

Published

CLI for zstd compression and decompression using zstdify

Downloads

1,096

Readme

zstdify-cli

NPM Package NPM Downloads Tests Coverage

Zstdify Logo

Command-line tool for compressing and decompressing files with zstd. Built on the zstdify package (pure TypeScript, no native dependencies).

Features

  • Pure JS/TS zstd CLI: No native addon dependency, portable across Node.js environments.
  • Compression + extraction workflows: Simple file-to-file commands with level/checksum controls.
  • Interop-focused: Files produced by zstdify are decoded by the official zstd CLI, and zstd output is decoded by zstdify.
  • Robust command UX: Clear subcommands, aliases, and actionable error messages.
  • Optional dictionary support: Train dictionaries from samples and use them with compress/extract when needed.

Installation

pnpm add -g zstdify-cli

Commands

| Command | Description | | ------- | ----------- | | zstdify compress <input> <output> | Compress a file with zstd | | zstdify extract <input> <output> | Decompress a zstd-compressed file | | zstdify dict train <output> --input <path>... | Train a dictionary from sample files/directories |

Aliases: compress / c, extract / x.

Options (compress)

  • --level, -l — Compression level (0=raw, 1+=RLE, 2+=compressed blocks)
  • --checksum — Add content checksum to the frame
  • --dict — Dictionary file path to use for compression
  • --dictID — Dictionary ID to store in the frame header
  • --noDictId — Do not write dictID in frame header

Options (extract)

  • --dict — Dictionary file path for dictionary-compressed input
  • --dictID — Expected dictionary ID for validation

Options (dict train)

  • --recursive — Recursively collect files from input directories
  • --maxSamples — Maximum number of sample files to load
  • --algorithmfastcover, cover, or legacy
  • --maxdict — Maximum dictionary size in bytes
  • --dictID — Optional dictionary ID metadata setting
  • Advanced tuning knobs: --k, --d, --steps, --split, --f, --accel, --selectivity, --shrink

Examples

zstdify compress input.txt output.zst
zstdify compress input.txt output.zst --level 2
zstdify extract output.zst restored.txt
zstdify dict train my.dict --input samples/ --recursive --maxdict 2048
zstdify compress input.txt output.zst --dict my.dict --dictID 42
zstdify extract output.zst restored.txt --dict my.dict --dictID 42

How we validate

CLI behavior is covered by automated tests (pnpm vitest, including packages/cli-tests):

  • CLI round-trip: zstdify compress -> zstdify extract restores original file bytes.
  • Core flags and aliases: Compression levels, checksums, and command aliases are exercised.
  • Differential interop with official zstd CLI:
    • zstd output is extracted by zstdify-cli.
    • zstdify-cli output is decompressed by zstd.
    • These checks run across standard (non-dictionary) workflows.
  • Dictionary interop coverage:
    • zstd -D dict compressed streams are extracted by zstdify-cli --dict.
    • zstdify-cli --dict compressed streams are decompressed by zstd -D dict.
    • Coverage includes both zstd-trained and zstdify-trained dictionaries.
  • Error paths: Missing files and invalid inputs produce non-zero exits and actionable messages.

Acknowledgements

This project is made possible by the original zstd project by Meta and its contributors. The monorepo, project, and CLI structure were bootstrapped from hdrify, which made this project much easier to build.

License

MIT

Author

Ben Houston, Sponsored by Land of Assets