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

@ioai/hdf5

v0.1.5

Published

Performance-oriented HDF5 for the web and Node: WASM core + JS IO/cache + batch API

Downloads

353

Readme

@ioai/hdf5

Performance-oriented HDF5 access for browsers (Web Workers), Node.js, and future native targets. Architecture:

  • WASM / HDF5 C core — HDF5 semantics, filters, chunk cache (when built with HDF5).
  • TypeScript API — async, typed, batch-oriented calls to minimize JS/WASM boundary crossings.
  • JS IO layerArrayBuffer, Blob/File, Node fs, and experimental HTTP Range + LRU block cache.

The default entry is Vite/bundler-first: Emscripten glue and the .wasm binary sit under dist/wasm/ and are referenced from the published JS so bundlers (Vite, etc.) own the asset URLs.

Install

npm install @ioai/hdf5

Quick start (Vite / bundlers — recommended)

import hdf5 from '@ioai/hdf5';

await hdf5.ready;
hdf5.FS.mkdirTree('/work');
hdf5.FS.writeFile('/work/file.h5', uint8Array);
const file = new hdf5.File('/work/file.h5', 'r');
try {
  console.log(file.keys());
} finally {
  file.close();
}

npm run build in this package requires a prior WASM build under dist/wasm/ (see Building WASM). The build copies glue into src/wasm/ for TypeScript, runs tsc, then restores the untouched Emscripten glue into dist/wasm/.

Escape hatch: explicit URLs (initHdf5)

For tests or non-Vite hosts, load glue/wasm from arbitrary URLs:

import { initHdf5 } from '@ioai/hdf5';

const runtime = await initHdf5({
  wasmJsUrl: new URL('./path/to/ioai_hdf5.js', import.meta.url),
  wasmBinaryUrl: new URL('./path/to/ioai_hdf5.wasm', import.meta.url),
});

Building WASM

Production (default for CI/npm): Docker + HDF Group official HDF5 source + official zlib — see scripts/README-build.md (npm run build:wasm:full:docker). Default build enables gzip/DEFLATE; SZIP/AEC is off unless you maintain a separate build profile.

Stub (no HDF5 C library): npm run build:wasm:stub:docker — produces runnable glue for CI/typecheck; npm run smoke:wasm skips HDF5 fixture checks unless built with IOAI_HDF5_HAVE_LIB.

From scratch: Emscripten, CMake, and your own HDF5-for-Emscripten tree — see native/README.md and scripts/README-build.md.

Publishing (maintainers)

  1. Bump version in package.json and merge to main.
  2. Create an annotated tag that matches that version, e.g. git tag -a v0.1.3 -m "Release 0.1.3" && git push origin v0.1.3.
  3. GitHub Actions Publish npm runs the same Docker WASM + tests as CI, then runs npm publish.
    • Token in repository secrets: add NPM_TOKEN (npm automation or granular publish token for @ioai).
    • Token in an Environment secret: create an environment (e.g. npm) under Settings → Environments, add secret NPM_TOKEN, and ensure Deployment branches and tags allows your release tags (e.g. v*.*.*). The workflow sets jobs.publish.environment: npm — change that value if your environment uses a different name.

License

MIT — see LICENSE. Third-party components are listed in THIRD_PARTY_NOTICES.md.