# @guoyunhe/downloader

> Download large files with minimum RAM usage. Support tar.gz and zip extraction.

Latest version **1.5.0** (published 2026-03-21) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install @guoyunhe/downloader
pnpm add @guoyunhe/downloader
yarn add @guoyunhe/downloader
bun add @guoyunhe/downloader
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.5.0 |
| Published | 2026-03-21 |
| First published | 2023-01-26 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 45.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Guo Yunhe |
| Maintainers | guoyunhe |
| Keywords | download, extract, archive, unzip, decompress, node |

## Links

- npm: https://www.npmjs.com/package/@guoyunhe/downloader
- Repository: https://github.com/guoyunhe/downloader
- Homepage: https://github.com/guoyunhe/downloader#readme
- Issues: https://github.com/guoyunhe/downloader/issues
- Funding: https://github.com/sponsors/guoyunhe
- npm.io page: https://npm.io/package/@guoyunhe/downloader

## Dependencies (2)

- [tar](https://npm.io/package/tar.md) ^7.5.12
- [node-stream-zip](https://npm.io/package/node-stream-zip.md) ^1.15.0

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 1.5.0 (latest) — 2026-03-21
- 1.4.0 — 2026-02-06
- 1.3.0 — 2023-01-29
- 1.2.1 — 2023-01-29
- 1.2.0 — 2023-01-29
- 1.0.0 — 2023-01-26

## README

# @guoyunhe/downloader

Download large files with minimum RAM usage. Support tar.gz and zip extraction.

## Install

```bash
npm i @guoyunhe/downloader
```

## Usage

Download a simple file

```ts
import { download } from '@guoyunhe/downloader';

await download('https://example.com/logo.png', 'dist/path/logo.png');
```

Download and extract tar.gz or zip archive

```ts
import { download } from '@guoyunhe/downloader';

await download('https://example.com/data.tar.gz', 'dist/path/', { extract: true });
// Output:
// └── export-2023-01-01
//     └── data
//         ├── spec.xml
//         ├── report.pdf
//         └── raw.dat
```

Reduce extraction file path by two folder

```ts
import { download } from '@guoyunhe/downloader';

await download('https://example.com/data.tar.gz', 'dist/path/', { extract: true, strip: 2 });
// Output:
// ├── spec.xml
// ├── report.pdf
// └── raw.dat
```

Receive download progress updates

```ts
import { download } from '@guoyunhe/downloader';

await download('https://example.com/data.tar.gz', 'dist/path/data.tar.gz', {
  onProgress(progress) {
    if (progress.totalBytes === null) {
      console.log(`${progress.downloadedBytes} bytes downloaded`);
    } else {
      console.log(`${progress.percentage?.toFixed(2)}%`);
    }
  },
});
```

---
_Source: https://npm.io/package/@guoyunhe/downloader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
