# @buh/unzip

> another unzip

Latest version **0.1.1** (published 2023-09-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install @buh/unzip
pnpm add @buh/unzip
yarn add @buh/unzip
bun add @buh/unzip
```

## Health

**Score 30/100 (F)** — status: abandoned.

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

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2023-09-13 |
| First published | 2023-09-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 11.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Bruno Franca |
| Maintainers | bsfranca2 |
| Keywords | unzip, bun |

## Links

- npm: https://www.npmjs.com/package/@buh/unzip
- Repository: https://github.com/bsfranca2/unzip
- Homepage: https://github.com/bsfranca2/unzip#readme
- Issues: https://github.com/bsfranca2/unzip/issues
- npm.io page: https://npm.io/package/@buh/unzip

## 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

- 0.1.1 (latest) — 2023-09-13
- 0.1.0 — 2023-09-13

## README

# unzip

## Installation

`npm install @buh/unzip`

## Quick Examples

### Bun

Use `inflateSync` from `Bun.inflateSync`

```javascript
import { Zip } from '@buh/unzip';

const file = Bun.file('archive.zip');
const arrayBuffer = await file.arrayBuffer();

const zip = await Zip.create(arrayBuffer);
for (const entry of zip.iterator()) {
  console.log(entry.fileName, entry.lastModified(), zip.textDecoder.decode(entry.getData()));
}
```

### Node

Use `inflateRawSync` from `node:zlib`

```javascript
import { Zip } from '@buh/unzip';
import { readFileSync } from 'node:fs';

const file = readFileSync('archive.zip');

const zip = await Zip.create(file.buffer);
for (const entry of zip.iterator()) {
  console.log(entry.fileName, entry.lastModified(), zip.textDecoder.decode(entry.getData()));
}
```

## References

- [kriskowal/zip](https://github.com/kriskowal/zip)
- [.ZIP File Format Specification](/docs/APPNOTE.md)

## Chagelogs

You can track the changelogs in [CHANGELOGS.md](/CHANGELOG.md) file.

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