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

@gsusrh/lyt

v1.0.1

Published

High-performance BPE-based binary compression and AES-256-GCM encryption suite using OpenAI's tokenizer

Readme

📦 LYT

High-performance binary compression and encryption powered by BPE tokenization (the same algorithm behind GPT-4).

Compress any text or JSON into a compact binary format using OpenAI's o200k_base tokenizer + Varint encoding. Optionally encrypt with AES-256-GCM.

Install

npm install @gsusrh/lyt

Quick Start

Compress & Decompress

import { pack, unpack } from '@gsusrh/lyt';

const data = { users: ["Alice", "Bob"], count: 2 };

// Compress → Uint8Array
const binary = pack(data);
console.log(`Compressed to ${binary.length} bytes`);

// Decompress → original object
const original = unpack(binary);
console.log(original); // { users: ["Alice", "Bob"], count: 2 }

Encrypt & Decrypt (Seal / Open)

import { seal, open } from '@gsusrh/lyt';

const secret = "my-secure-key";
const data = "Sensitive information";

// Compress + Encrypt → Uint8Array
const sealed = seal(data, secret);

// Decrypt + Decompress → original
const result = open(sealed, secret);
console.log(result); // "Sensitive information"

API

| Function | Description | |----------|-------------| | pack(data) | Compress any value (string, object, array) to Uint8Array | | unpack(buffer) | Decompress a Uint8Array back to the original value | | seal(data, key) | Compress + encrypt with AES-256-GCM | | open(buffer, key) | Decrypt + decompress |

How It Works

  1. Tokenization — Text is converted to token IDs using OpenAI's o200k_base BPE encoder
  2. Varint Encoding — Token IDs are stored as variable-length integers (small tokens = fewer bytes)
  3. Encryption (optional) — AES-256-GCM with scrypt key derivation, random IV, and auth tag

Performance

BPE compression is especially effective on natural language text and repetitive JSON structures, achieving 50-70% size reduction compared to raw UTF-8.

Requirements

  • Node.js ≥ 18
  • Server-side only (uses Node.js crypto and Buffer)

License

ISC — Created by Jesus Rodriguez