dotnet add package ValvePak --version                
NuGet\Install-Package ValvePak -Version                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ValvePak" Version="" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ValvePak --version                
#r "nuget: ValvePak,"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ValvePak as a Cake Addin
#addin nuget:?package=ValvePak&version=

// Install ValvePak as a Cake Tool
#tool nuget:?package=ValvePak&version=                

<h1><img src="./Misc/logo.png" width="64" align="center"> Valve Pak (vpk) for .NET</h1>

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.


using var package = new Package();

// Open a vpk file

// Can also pass in a stream

// Optionally verify hashes and signatures of the file if there are any

// 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.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ValvePak:

Package Downloads

Library to decompile Valve Source 2 files

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on ValvePak:

Repository Stars
🔬 Valve's Source 2 resource file format parser, decompiler, and exporter.
Version Downloads Last updated 643 5/9/2024 258 3/22/2024 629 2/13/2024 1,939 1/7/2024 842 11/23/2023 3,135 9/8/2023 223 9/5/2023 1,807 7/14/2023 2,032 3/22/2023 3,368 4/29/2022 740 1/15/2022 5,271 11/23/2021 2,741 6/23/2020 3,022 3/21/2019 456 3/19/2019 2,750 9/18/2016 1,326 9/18/2016 1,121 9/18/2016