remote-zip

List and fetch individual files from a remote ZIP archive over HTTP Range requests — without downloading the whole archive.

Features

Install

npm install @gyng/remote-zip

Usage

import { RemoteZipPointer } from "@gyng/remote-zip";

const url = new URL("https://example.com/archive.zip");
const zip = await new RemoteZipPointer({ url }).populate();

zip.files(); // -> [{ filename, size, modified, attributes }, ...]
const bytes = await zip.fetch("path/in/zip.txt"); // -> Uint8Array

Try it

Loads a small sample ZIP served from this page. Try your own URL — the server must allow CORS and HTTP Range requests.