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

roxify

v1.2.7

Published

Encode binary data into PNG images with Zstd compression and decode them back. Supports CLI and programmatic API (Node.js ESM).

Readme

roxify

npm version

Encode binary data into PNG images and decode them back. Supports CLI and programmatic API (Node.js ESM).

Roxify is a compact, color-based alternative to QR codes, designed specifically for digital-only use (not for printing). It encodes data using color channels (rather than monochrome patterns) for higher density, and is optimized for decoding from approximate screenshots — including nearest-neighbour resize/stretch and solid or gradient backgrounds. It is not intended for printed media and is not resilient to lossy compression or heavy image filtering.

Roxify creates PNGs that are often more space-efficient than ZIP or 7z archives for similar payloads without loss. Roxify provides superior compression ratios, making it ideal for embedding images, GIFs, audio, video, code, and other files without any quality loss — the original file is perfectly recovered upon decoding.

Key benefits:

  • Superior Compression: Roxify outperforms traditional ZIP and 7z (LZMA) in speed and ratio, enabling smaller PNG outputs.
  • Lossless Embedding: Compress and embed any file type (images, videos, code) with full fidelity restoration.
  • Code Efficiency: Hyper-efficient for compressing source code, reducing file sizes dramatically.
  • Obfuscation & Security: Obfuscate code or lock files with AES-256-GCM encryption, more compact than password-protected ZIPs.
  • Visual Data Indicator: PNG size visually represents embedded data size, providing an intuitive overview.
  • Archive Support: Pack directories into archives, list contents without decoding, and extract individual files selectively.
  • Central Directory: Access file lists without passphrase, even for encrypted archives.

Installation

npm install roxify

CLI Usage

npx rox encode <inputName>.ext (<outputName>.png)
npx rox decode <inputName>.png (<outputName>.ext)
npx rox list <inputName>.png

If no output name is provided:

  • Encoding: output defaults to <inputName>.png.
  • Decoding: if the image contains the original filename it will be restored; otherwise the output will be decoded.bin.

Options:

  • -p, --passphrase <pass> — Encrypt with AES-256-GCM
  • -v, --verbose — Show detailed errors

Run npx rox help for full options.

API Usage

Basic Encoding and Decoding

import { readFileSync, writeFileSync } from 'fs';
import { encodeBinaryToPng } from 'roxify';

const fileName = 'input.bin';
const inputBuffer = readFileSync(fileName);
const pngBuffer = await encodeBinaryToPng(inputBuffer, {
  name: fileName,
});
writeFileSync('output.png', pngBuffer);
import { readFileSync, writeFileSync } from 'fs';
import { decodePngToBinary } from 'roxify';

const pngFromDisk = readFileSync('output.png');
const { buf, meta } = await decodePngToBinary(pngFromDisk);
writeFileSync(meta?.name ?? 'decoded.txt', buf);

With Passphrase

const pngBuffer = await encodeBinaryToPng(inputBuffer, {
  name: fileName,
  passphrase: 'mysecret',
});
const { buf, meta } = await decodePngToBinary(pngFromDisk, {
  passphrase: 'mysecret',
});

With Progress Logging

const pngBuffer = await encodeBinaryToPng(inputBuffer, {
  name: fileName,
  onProgress: (info) => {
    console.log(`Phase: ${info.phase}, Loaded: ${info.loaded}/${info.total}`);
  },
});

Requirements

  • Node.js 18+ (ESM)
  • Native dependencies: sharp (auto-installed)

License

This package is proprietary (UNLICENSED). The repository remains private; the package is published to npm for distribution. If there is significant community interest, it may be open-sourced in the future.

Minimal PNG container (minpng) 🔧

This library includes a compact encoder/decoder that targets the smallest possible PNG container while guaranteeing pixel-perfect recovery from screenshots when no lossy filtering is applied.

  • Inputs must be raw RGB 8-bit buffers (no alpha).
  • Transformations used: Paeth 2D predictor (left/top), RGB decorrelation (G, R−G, B−G), zigzag traversal.
  • Compression: Zstd at maximum compression level.
  • Output: neutral PNG (no ICC/gamma/alpha), all data mapped to RGB bytes only.
  • The decoder searches for start/end markers and a compact header embedded in pixels to perform a reliable, deterministic roundtrip.

Use encodeMinPng(rgbBuf, width, height) and decodeMinPng(pngBuf) from the public API (roxify).