# @diablo2/mpq

> MPQ Reader for diablo2

Latest version **0.9.0** (published 2021-10-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install @diablo2/mpq
pnpm add @diablo2/mpq
yarn add @diablo2/mpq
bun add @diablo2/mpq
```

## 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.9.0 |
| Published | 2021-10-22 |
| First published | 2020-09-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 163.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 230 |
| Author | Blayne Chard |
| Maintainers | blacha |

## Links

- npm: https://www.npmjs.com/package/@diablo2/mpq
- Repository: https://github.com/blacha/diablo2
- Homepage: https://github.com/blacha/diablo2#readme
- Issues: https://github.com/blacha/diablo2/issues
- npm.io page: https://npm.io/package/@diablo2/mpq

## Dependencies (2)

- [binparse](https://npm.io/package/binparse.md) ^1.2.1
- [implode-decoder](https://npm.io/package/implode-decoder.md) ^1.0.1

## Recent versions

- 0.9.0 (latest) — 2021-10-22
- 0.8.0 — 2021-10-17
- 0.7.0 — 2021-10-16
- 0.6.0 — 2021-10-13
- 0.5.0 — 2021-03-26
- 0.4.0 — 2020-11-06
- 0.3.0 — 2020-09-20
- 0.2.1 — 2020-09-19

## README

## @diablo2/mpq

MPQ Reader for diablo2

Supports decoding PKWARE compression


```typescript

import {Mpq} from '@diablo2/mpq'

// Read from file
const mpq = Mpq.load('patch_d2.mpq');
const lang = await mpq.extract('data\\local\\LNG\\ENG\\patchstring.tbl');
// or
const lang = await mpq.extract('data/local/LNG/ENG/patchstring.tbl');



// Read from buffer
const mpqBuf = await fs.promises.read('patch_d2.mpq');
const mpq = Mpq.load(mpqBuf);
const lang = await mpq.extract('data\\local\\LNG\\ENG\\patchstring.tbl');
```

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