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

@dolphindepot/bnr

v0.1.2

Published

Encode and decode Nintendo GameCube BNR1/BNR2 (opening.bnr) files

Readme

@dolphindepot/bnr

Encode and decode Nintendo GameCube BNR1/BNR2 (opening.bnr) files.

  • Zero dependencies
  • Works in browsers, Node.js, and Cloudflare Workers
  • Full support for BNR1 (US/JP) and BNR2 (PAL/Europe, 6 languages)
  • RGB5A3 pixel format with GX 4x4 tile encoding
  • Shift-JIS text encoding/decoding

Install

npm install @dolphindepot/bnr

Usage

Decode

import { decode } from "@dolphindepot/bnr";

const bnr = decode(arrayBuffer);

if (bnr.type === "BNR1") {
    console.log(bnr.text.gameTitle);
} else {
    // BNR2 — 6 language blocks
    console.log(bnr.texts[0].gameTitle); // English
}

// bnr.image.pixels is RGBA data (96x32, 12288 bytes)
// Ready to draw on a <canvas> via ImageData

Encode

import { encode } from "@dolphindepot/bnr";

const binary = encode({
    type: "BNR1",
    image: rgbaPixels, // Uint8Array, 96x32x4 = 12288 bytes
    text: {
        gameNameShort: "My Game",
        developerNameShort: "Dev",
        gameTitle: "My Game - Full Title",
        developerName: "Developer Name",
        description: "A homebrew GameCube game.",
    },
});

// binary is a Uint8Array — save as opening.bnr

BNR2 (multi-language)

import { encode, BnrLanguage } from "@dolphindepot/bnr";

const texts = [
    { gameNameShort: "My Game", ... },    // English
    { gameNameShort: "Mein Spiel", ... }, // German
    { gameNameShort: "Mon Jeu", ... },    // French
    { gameNameShort: "Mi Juego", ... },   // Spanish
    { gameNameShort: "Il Mio Gioco", ... }, // Italian
    { gameNameShort: "Mijn Spel", ... },  // Dutch
];

const binary = encode({ type: "BNR2", image: rgbaPixels, texts });

Image format

The library works with raw RGBA pixel data (Uint8Array of 12288 bytes for a 96x32 image). To convert from PNG/JPEG:

Browser (Canvas API):

const img = new Image();
img.src = URL.createObjectURL(file);
await img.decode();

const canvas = new OffscreenCanvas(96, 32);
const ctx = canvas.getContext("2d")!;
ctx.drawImage(img, 0, 0, 96, 32);
const rgba = new Uint8Array(ctx.getImageData(0, 0, 96, 32).data);

BNR format reference

| | BNR1 (US/JP) | BNR2 (PAL/Europe) | |---|---|---| | File size | 6496 bytes | 8096 bytes | | Image | 96x32 px, RGB5A3 | 96x32 px, RGB5A3 | | Languages | 1 | 6 (EN, DE, FR, ES, IT, NL) | | Text encoding | Shift-JIS | Shift-JIS |

License

MIT