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

flash-md5

v1.0.1

Published

FlashMD5 is a fast MD5 tool for WebApp, especially for scenarios where you need to calculate the MD5 of large files.

Readme

FlashMD5 is a high-performance MD5 computing tool running on the web side, with a speed close to that of the command line tool, and is especially suitable for scenarios where large files MD5 are calculated on the web side. Here are some core implementations:

  1. Turn on the Webworker operation MD5 result, and will not block the rendering process
  2. Using Openssl's MD5 implementation, fast calculation speed

Start quickly

import FlashMD5 from "flash-md5";

(async () => {
    const flashMD5 = new FlashMD5({
        entry: "https://cdn.jsdelivr.net/npm/[email protected]/lib/build/flash-md5.js",
        wasm: "https://cdn.jsdelivr.net/npm/[email protected]/lib/build/flash-md5.wasm"
    });

    await flashMD5.init(); // Initialization

    // Get the file ArrayBuffer
    xxx.onchange = function() {
        const file = this.files[0];
        const chunkSize = FlashMD5.BASIS_CHUNK_SIZE * 20; // Control the shard size, BASIS_CHUNK_SIZE = 5MB

        for (let start = 0; start < file.size; start += chunkSize) {
            const chunk = file.slice(start, start + chunkSize);
            const buffer = await chunk.arrayBuffer();

            await flashMD5.update(buffer); // sharding calculation
        }

        const result = flashMD5.end(); // Get MD5 results
    }
})()

Online example

Demo:https://codesandbox.io/p/sandbox/nice-mccarthy-jx35z3

Development

1. Environmental preparation

If you need to complete development on Windows system, please execute the following commands through WSL

git submodule init
git submodule update

./extra/emsdk/emsdk install 4.0.8
./extra/emsdk/emsdk activate 4.0.8
source ./extra/emsdk/emsdk_env.sh

npm install

2. Compilation test

# compilation
./build.sh

# test
npm run test

Known issues

1. blob.arrayBuffer() takes a long time:

The parameter type of the update() method is arrayBuffer. After obtaining the file handle, you need to convert the data type by calling the arrayBuffer() method. This process requires hard disk reading, and the time consumption mainly depends on the hard disk reading performance. If you find that this takes a long time, or considering that the user's machine performance is poor, you can consider adjusting the shard size of each file acquisition to avoid having a longer io wait before calculating MD5.

Or you can consider reading files into memory asynchronously to avoid waiting for data preparation when MD5 is calculated, for example:

const bufferArray = [];

function getFileBlocks(file) {
    const chunkBufferArray = [];

    for (let start = 0; start < file.size; start += chunkSize) {
        const chunk = file.slice(start, start + chunkSize);
        chunkBufferArray.push(chunk.arrayBuffer());
    }
    return chunkBufferArray;
}

fileInput.onchange = function () {
    bufferArray = getFileBlocks(this.files[0]);
}

btn.onclick = async function () {
    while(chunkBufferArray.length > 0) {
        const buffer = await bufferArray.shift();
        flashMD5.update(buffer);
    }

    const result = flashMD5.end();
}