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

zmodem2-wasm

v1.1.0

Published

WebAssembly compilation of the zmodem2 Rust crate by Jarkko Sakkinen (https://codeberg.org/jarkko/zmodem2)

Readme

zmodem2-wasm

中文版

This project is a WebAssembly compilation of the zmodem2 Rust crate.

All credit for the ZMODEM protocol implementation goes to the original author, Jarkko Sakkinen, and the contributors of the zmodem2 project. This repository simply provides a WASM wrapper and NPM packaging for easier use in web-based terminal environments.

Features

  • High Performance: Powered by Rust and WebAssembly.
  • Modern API: Easy-to-use TypeScript interfaces for ZMODEM sender and receiver.
  • xterm.js Integration: Can be easily integrated with xterm.js for terminal file transfers.
  • Small Footprint: Efficiently compiled WASM binary.

Installation

npm install zmodem2-wasm

Running the Demo

The repository includes a full demo showing how to use zmodem2-wasm with xterm.js and a Node.js backend.

Prerequisites

Steps

  1. Install Dependencies:

    npm install
  2. Start the Docker Test Server (Optional): For testing ZMODEM file transfers, you can run a Docker-based SSH server with ZMODEM support.

    cd src/dockers
    ./build.sh
    ./run.sh

    This will start an SSH server on port 23355 with user zxd (password: zxd) or root (password: root).

  3. Start the Backend: The backend handles SSH/Terminal sessions.

    npm run backend
  4. Start the Frontend: This will build the WASM and start the Vite dev server.

    npm start
  5. Access the Demo: Open your browser at http://localhost:3002.

Usage

Initialization

import init, { WasmReceiver, WasmSender } from 'zmodem2-wasm';

async function setup() {
    await init();
    const receiver = new WasmReceiver();
    const sender = new WasmSender();
}

Receiving Files

const receiver = new WasmReceiver();

// Feed incoming data from the wire
receiver.feed(data);

// Poll for events
const event = receiver.poll();
if (event && event.type === 'file_start') {
    console.log(`Receiving file: ${event.name}, size: ${event.size}`);
}

// Drain outgoing data to send back to the peer
const outgoing = receiver.drain_outgoing();
socket.send(outgoing);

// Drain received file data
const fileData = receiver.drain_file();
// Save fileData...

Sending Files

const sender = new WasmSender();

// Start sending a file
sender.start_file("hello.txt", data.length);

// Feed file data
sender.feed_file(data);

// Drain data to send over the wire
const outgoing = sender.drain_outgoing();
socket.send(outgoing);

License

MIT OR Apache-2.0 (same as zmodem2)


Other Solution: zmodem2-js

zmodem2-js is another solution ported from the zmodem2 Rust crate, implemented in pure JavaScript.

This project does not require WebAssembly and is suitable for scenarios where a pure JS implementation is needed. It provides similar functionality to zmodem2-wasm and can be used directly in Node.js or browser environments.

Project link: https://github.com/zxdong262/zmodem2-js