nopq

NoPQ is a Node.js library that lets you unpack MPQ archives such as those used with several Blizzard games.

Usage no npm install needed!

<script type="module">
  import nopq from 'https://cdn.skypack.dev/nopq';
</script>

README

NoPQ

NoPQ is a Node.js library that lets you unpack MPQ archives such as those used with several Blizzard games.

Limitations

NoPQ is only tested against Heroes of the Storm replay files. Therefor several assumptions are made such as the presense of UserData and exclusive use of BZ2 compression.

The library is only able to decompress MPQ archives.

Install

$ npm install nopq

CLI

$ nopq filename [extract]

A filename must always be provided however extract is optional. If extract is provided the program will pipe decompressed file from the archive. If extract is not provided the program will output a list of files contained in the archive.

API

  • nopq
    • Class: Archive
      • new Archive(buffer)
      • archive.buffer
      • archive.offset
      • archive.hashTable
      • archive.blockTable
      • archive.readFile(filename)
    • Class: Table
      • new Table(key, encryption, buffer)
      • table.buffer
      • table.readAsHashTable(entries)
      • table.readAsBlockTable(entries)

Contributing

Please feel free to contribute. We are currently looking to extend the library capability to handle previous MPQ versions.