vpk2
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

node-vpk2

Extractor and creator for the Valve Pack Format.

Prerequisites

Requires Node v13.2.0 and higher. Requires jBinary and crc, but npm/yarn will install them automatically if you follow these instructions.

Installing

NPM:

npm install vpk2

Yarn:

yarn add vpk2

How to use

To extract a V1/V2 VPK:

import { VPK } from "vpk2";

// load a vpk (V1/V2) (ALWAYS select the _dir file)
let my_vpk = new VPK("FILE_LOCATION_HERE");
my_vpk.load();

// extract it
my_vpk.extract("FILE_LOCATION_HERE");

To create a V1 VPK (V2 is not currently supported):

import { VPKcreator } from "vpk2";

// Load a directory
var my_vpk = new VPKcreator("FILE_LOCATION_HERE");
my_vpk.load();

// Save it as .vpk
my_vpk.save("FILE_LOCATION_HERE");

Readme

Keywords

Package Sidebar

Install

npm i vpk2

Weekly Downloads

1

Version

0.2.0

License

MIT

Unpacked Size

31.5 kB

Total Files

18

Last publish

Collaborators

  • wavpro