remote-zip
List and fetch individual files from a remote ZIP archive over HTTP Range requests — without downloading the whole archive.
Features
- Fetch individual files and listings (buffered or streaming)
- ZIP64 (>4 GiB / >65,535 entries)
- Encrypted entries: ZipCrypto and WinZip AES
- CP437 / UTF-8 filenames; optional CRC-32 verification
- Runs in the browser and Node (≥22); one runtime dependency
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.