Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nopq

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nopq - npm Package Compare versions

Comparing version 1.0.4 to 1.1.0

5

bin/nopq.js

@@ -17,2 +17,7 @@ #!/usr/bin/env node

if (process.argv.indexOf('--user-data') > -1) {
process.stdout.write(archive.readUserData().toString('binary'));
return;
}
// Read the "(listfile)" file that every archive has. It lists the contents of

@@ -19,0 +24,0 @@ // the archive separated by newlines.

11

lib/nopq.js

@@ -15,5 +15,8 @@ var bzip = require('bzip2');

var isUserData = this.buffer.readUInt8(3) === 0x1b;
if (!isUserData) throw new Error('Could not find user data.')
if (!isUserData) {
throw new Error('Could not find user data.')
}
this.offset = this.buffer.readUInt32LE(8);
this.userDataSize = this.buffer.readUInt32LE(12);

@@ -33,4 +36,10 @@ var offset = this.offset + this.buffer.readUInt32LE(this.offset + 16);

this.blockTable = table.readAsBlockTable(entries);
this.readUserData();
}
Archive.prototype.readUserData = function () {
return this.buffer.slice(16, 16 + this.userDataSize);
};
Archive.prototype.readFile = function (filename) {

@@ -37,0 +46,0 @@ var hash = hashTableLookup(this.hashTable, filename);

2

package.json
{
"name": "nopq",
"version": "1.0.4",
"version": "1.1.0",
"description": "NoPQ is a Node.js library that lets you unpack MPQ archives such as those used with several Blizzard games.",

@@ -5,0 +5,0 @@ "main": "lib/nopq.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc