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

@r00tkids/rootsqz

v0.17.0

Published

Compresses and packs JavaScript and assets into one HTML file, for demoscene intros and size restricted challenges.

Readme

@r00tkids/rootsqz

NPM Version

rootsqz compresses and packs JavaScript and assets into one HTML file. This is intended for intros in the demoscene or size restricted JS challenges.

This package installs the rootsqz executable for your platform and a small Node API to run it. For Rollup and Vite, see @r00tkids/rollup-plugin-rootsqz.

Install

npm i -D @r00tkids/rootsqz

Prebuilt executables exist for macOS (arm64, x64), Linux (arm64, x64) and Windows (x64). They are optional dependencies, so do not install with --omit=optional.

Command line

npx rootsqz --js-main index.js --file shader.glsl --output-directory out

See npx rootsqz --help and the rootsqz README for the options.

With --report, rootsqz writes a compression report to out/report, and npx rootsqz report out --view hotspots --top 20 prints views of it. npx rootsqz install-skill installs an agent skill into your project, so that coding agents such as Claude Code can make and read the report themselves.

Node API

import { compress } from '@r00tkids/rootsqz';

await compress({
    /**
     * JavaScript file that is evaluated after decompression.
     */
    jsMain: 'index.js',

    /**
     * Directory that the output is written to.
     */
    outputDirectory: 'out',

    /**
     * Packed with compression. Files of similar content should follow each other.
     */
    files: ['shader.glsl'],

    /**
     * Packed without compression
     */
    preCompressedFiles: ['image.jpg'],

    /**
     * "64k" (default), "4k" for small intros, "64k-wasm" for 64k intros with WebAssembly files,
     * "64k-semi-fast" or "64k-fast", which decode about 1.7 and 2 times as fast as "64k" but pack
     * about 2% and 6% larger
     */
    sizeProfile: '64k',

    /**
     * Write a compression report to out/report. reportModels and reportDetail add detail,
     * reportSourceMap, reportLabels and reportWasmDebug ({ 'x.wasm': 'x.debug.wasm' }) add names.
     */
    report: true,

    /**
     * Loader shown while the web output decompresses: `preset` "spinner", "bar" or "progress",
     * or your own `html` and `js` files. `keep` leaves it in place when the main JavaScript runs.
     */
    loader: { preset: 'bar' },

    /**
     * How the web output decodes: "serial", "sliced" or "worker" (in a web worker).
     * By default "sliced" with a loader script, otherwise "serial".
     */
    decoder: 'worker',

    /**
     * Title of the web page, and a script that runs first, before the loader and decompression.
     */
    title: 'My intro',

    /**
     * Hide the packed bytes while the page loads. By default on with the 64k size profiles.
     */
    hideData: true,
    bootJs: 'boot.js',
});

| Export | Description | |---|---| | compress(options) | Runs the executable with the given options. Rejects if it fails. | | compressArgs(options) | The command line arguments that compress passes. | | run(args, options) | Runs the executable with command line arguments. | | binaryPath() | Path of the executable for this platform. | | toolEnvironment(env) | Environment that points the executable to the bundled uglify-js. | | RUNTIME_GLOBAL | Name of the global that holds the packed files in the output: rsqz. |

In the packed JavaScript, rsqz.files["<file name>"] is the content of a packed file as an Uint8Array. A loader script sets rsqz.progress = (done, total) => ..., see Loader.

Environment variables

  • ROOTSQZ_BINARY_PATH: path of a rootsqz executable to use instead of the installed one.
  • ROOTSQZ_UGLIFYJS: UglifyJS program that the executable runs instead of the one bundled with this package.