ValvePak Save

📦 Fully fledged library to work with Valve's Pak archives in .NET

Project README

Valve Pak (vpk) for .NET

Build Status (GitHub) NuGet Coverage Status

VPK (Valve Pak) files are uncompressed archives used to package game content. This library allows you to read and extract files out of these paks.

Usage:

using var package = new Package();

// Open a vpk file
package.Read("pak01_dir.vpk");

// Can also pass in a stream
package.Read(File.OpenRead("pak01_dir.vpk"));

// Optionally verify hashes and signatures of the file if there are any
package.VerifyHashes();

// Find a file, this returns a PackageEntry
var file = package.FindEntry("path/to/file.txt");

if (file != null) {
	// Read a file to a byte array
	package.ReadEntry(file, out byte[] fileContents);
}

Do note that files such as pak01_001.vpk are just data files, you have to open pak01_dir.vpk.

Open Source Agenda is not affiliated with "ValvePak" Project. README Source: ValveResourceFormat/ValvePak
Stars
115
Open Issues
0
Last Commit
1 week ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating