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

@khatiwadaprashant/zipit-core

v2.0.0

Published

High-performance client-side ZIP streaming and resumable batch download engine

Readme

ZipIt ⚡️

npm version Bundle Size License: MIT Tests Passing TypeScript

The professional, high-performance ZIP streaming and resumable downloader for modern browsers. No server-side zipping. No RAM spikes. Zero compromise.

→ Try the Demo · API Reference · GitHub


⚡️ Why ZipIt?

Traditional file downloads in the browser are broken for large batches. ZipIt solves this by using Origin Private File System (OPFS) for staging and on-the-fly streaming compression.

| The Problem | Traditional Approach | ZipIt Solution | | :--- | :--- | :--- | | Server Load | Zipping on server blocks CPU/RAM | ✅ 0% Server CPU. Zipped in browser. | | RAM Usage | Loading all files into memory | ✅ 5MB Working Set. Streams to disk. | | Persistence | Refresh loses everything | ✅ Resumable. IDB tracks byte-level progress. | | Structure | Flat file lists | ✅ Folder Preservation. Recreates folders. | | Large Files | Crash on 1GB+ batches | ✅ Unlimited. Limited only by disk space. |


🚀 Getting Started

1. Install

pnpm add @khatiwadaprashant/zipit-core fflate

2. Basic Usage (5 Lines)

import { createZipIt } from '@khatiwadaprashant/zipit-core';

const ds = createZipIt({ concurrency: 4 });

// Add files with folder structure
ds.add('https://api.example.com/photo.jpg', { folder: 'travel/2024' });

// Stream-zip directly to user's disk
await ds.zip('my-archive.zip'); 

3. Native Folder Save (Zero ZIP needed)

// Recreates the folder structure directly on the user's local disk
await ds.start({ saveToFolder: true });

📘 Core Architecture

1. Client-Side ZIP Streaming

ZipIt uses a high-performance worker-based pipeline. As bytes are fetched from the network, they are fed into a fflate stream, which pumps compressed chunks directly to the user's disk via the File System Access API.

2. OPFS Staging Pipeline

To handle network instability, ZipIt stages files in the Origin Private File System. This allows for:

  • Resumable Downloads: If the user refreshes, we know exactly how many bytes we have.
  • Backpressure: We pause the network fetch if the disk write speed falls behind.

3. Byte-Level Resumability

// On app mount: restore the previous session automatically
const pending = await ds.hydrate();
if (pending.length > 0) {
  console.log(`Resuming ${pending.length} files...`);
  ds.start();
}

🛠 API Reference

createZipIt(options)

Creates a new manager instance.

  • concurrency: Number of parallel download workers (Default: 3).
  • dbName: IndexedDB name for state persistence (Default: 'zipit_v1').
  • onProgress: Global progress callback.

Instance Methods

  • ds.add(url, options): Queue a file.
  • ds.start(options): Begin downloading/transferring.
  • ds.pause() / ds.resume(): Control the queue.
  • ds.zip(filename): Generate and download a ZIP stream.
  • ds.hydrate(): Restore session from IndexedDB.

🌐 Browser Compatibility

| Feature | Chrome / Edge | Firefox | Safari | | :--- | :--- | :--- | :--- | | Streaming ZIP | ✅ 102+ | ✅ 111+ | ✅ 15.4+ | | OPFS Staging | ✅ | ✅ | ✅ 16+ | | Folder Save | ✅ (Native) | ⚠️ (ZIP Fallback) | ⚠️ (ZIP Fallback) | | Resumability | ✅ | ✅ | ✅ |


🤝 Contributing

We love contributions! Please read our Contributing Guide and follow Conventional Commits.

📝 License

MIT © Prashant Khatiwada