vpk-tools
TypeScript
// Overview
Valve VPK archive reader and writer for Node.js and Bun, with no runtime dependencies. Full v1/v2 support, single-file and multi-chunk archives, CRC32 and MD5 verification, streaming reads, RSA signing and a built-in CLI.
// Built with
TypeScriptNode.jsBunzero-depVPK
// The problem
Reading or writing VPK archives from JavaScript usually means shelling out to Valve's vpk.exe or depending on a dead Python port that only handles v1.
// Approach
- A pure-TypeScript VPK reader and writer with no runtime dependencies.
- Full v1/v2, single-file and multi-chunk archives with correct CRC32 and MD5 checksums.
- Demand-only reads, so a multi-GB archive opens instantly without buffering.
// Engineering challenges
- Implementing the full binary VPK format by hand: directory tree, per-file CRC32, v2 tree/archive/whole-file MD5 blocks and RSA signing.
- Making the writer produce byte-for-byte identical output to Valve's own tooling.
- Staying dependency-free while covering the full API surface.