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

@hozon/store-blob

v0.3.0

Published

Content-addressed blob metadata and resumable transfer store for Hozon

Readme

@hozon/store-blob

Content-addressed blob metadata, persistent chunk manifests, and resumable transfer progress. Byte storage and digest verification belong to the caller.

pnpm add @hozon/store-blob @hozon/db
import { blobStoreDefinition, getBlobStore } from '@hozon/store-blob'

db.register(blobStoreDefinition)
const blobs = await getBlobStore(db)
await blobs.insertEntry(
  {
    blobID: 'content-key',
    contentLength: 0,
    chunkSize: 4,
    state: 'local',
    createdAt: Date.now(),
  },
  [],
)

Entries map integer flags to booleans and expose camelCase fields. Encryption and key IDs are optional metadata that the store does not interpret. Repeated entry and manifest inserts preserve existing rows.

For a known remote entry, beginTransfer({ blobID, chunkSize, chunks, stagingID }) records its manifest, sets its state to partial, and records a transfer session for stagingID. Retries with the same chunk size preserve manifest digests. Progress is preserved only while stagingID matches the session; a different stagingID clears it. getTransfer, getTransferByStagingID, and touchTransfer read and refresh the session. Changing chunk size while a manifest exists rejects with Cannot change chunk size for blob <blobID>: manifest already exists. Record each verified chunk with recordTransferChunk, then call finalizeTransfer when all chunks are present. Finalisation preserves the manifest, clears transfer progress and the session, and sets the entry state to local. beginTransfer, recordTransferChunk, and finalizeTransfer reject absent entries with Blob entry <blobID> not found. recordTransferChunk rejects unknown manifest indexes with Blob chunk <blobID> at index <index> not found. Finalisation rejects missing chunks with Cannot finalize transfer <blobID>: <count> chunk(s) missing. deleteEntry removes the entry, manifest, transfer progress, and session together. Entries carry an optional contentType (string | null). listEntries({ limit, cursor }) pages entries by (createdAt, blobID) with an opaque cursor; limit is 1 to 1000. promoteEntry(entry, chunks) atomically replaces an entry's manifest and marks it local, keeping pinned and createdAt and clearing transfers and session. fillContentType(blobID, contentType) sets the content type only when the stored one is null. resetTransfer(blobID) atomically drops the session, progress, and manifest and sets the entry to remote-only. The 1-sessions migration resets existing partial entries to remote-only, dropping their manifests; this is not reversible. Manifest chunks reference entries, and transfer rows reference manifest chunks, with cascading deletion preventing orphan progress.

Tables follow the database's configured prefix, which defaults to hozon. Multi-statement mutations are atomic and reuse a provider transaction. Manifest inserts use batches of 166 rows to stay below 500 bound parameters.

See the store reference.