Releases: ValveResourceFormat/ValvePak
Releases · ValveResourceFormat/ValvePak
2.0.1
2.0.0
Full Changelog: 1.8.0...2.0.0
- .NET 8.0 is now required
- Removed
FindEntry
overloads - Reduced allocations in
FindEntry
- Updated logo
1.8.0
Full Changelog: 1.7.0...1.8.0
GetMemoryMappedStreamIfPossible
will read files smaller or equal to 4096 bytes into memory instead of memory mapping.GetMemoryMappedStreamIfPossible
now supports memory mapping files in non-split packages if the package was read from aFileStream
or when usingRead(file path)
.- CRC32 is now calculated with
System.IO.Hashing
1.7.0
Full Changelog: 1.6.2...1.7.0
- CRC32 mismatch exceptions will now print expected and actual values.
- Added
GetMemoryMappedStreamIfPossible
to get package entry file mmap for split vpks
1.6.2
Full Changelog: 1.6.1...1.6.2
- Added
ReadEntry
overload with user provided byte array - Allow VPKs where MD5 section is not exactly 48 bytes
1.6.1
Full Changelog: https://github.com/SteamDatabase/ValvePak/compare/1.6.0...1.6.1?w=1
- Removed
IsSignatureValid
call fromVerifyHashes
- Fixed slashes in
AddFile
- Added
VerifyChunkHashes
- Added
VerifyFileChecksums
1.6.0
Full Changelog: https://github.com/SteamDatabase/ValvePak/compare/1.5.0...1.6.0?w=1
- Added
Write()
method that will save to a vpk file (non-chunked) - Added
AddFile()
andRemoveFile()
methods - Optimized hash and signature verification to work on stream rather than reading all data into memory
1.5.0
Full Changelog: https://github.com/SteamDatabase/ValvePak/compare/1.4.0...1.5.0?w=1
- Added
OptimizeEntriesForBinarySearch(StringComparison)
- Call this before
Read()
- This sorts the entries, which allows
FindEntry(string fileName)
to useBinarySearch
to find the entries much faster - This also allows
FindEntry
to search case insensitively if desired - This is experimental, and maybe removed in the future
- Call this before
FindEntry(string directory, string fileName)
andFindEntry(string directory, string fileName, string extension)
overloads have been deprecated
1.4.0
Full Changelog: 1.3.0...1.4.0
- Added support for Counter-Strike 2 vpks
IsSignatureValid
now returns true if there no signature available
1.3.0
Full Changelog: 1.2.0...1.3.0
IsDirVPK
andHeaderSize
properties are now public.- Use the original file name when opening file stream.
- Optimized
ReadEntries
to be faster and allocate less.
Test on Dota 2's pak01_dir.vpk on Ryzen 3700x:
Method | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|
Old | 1,106.5 ms | 21.83 ms | 31.31 ms | 112000 | 30000 | 4000 | 877 MB |
New | 217.7 ms | 4.11 ms | 4.57 ms | 7666 | 4333 | 1333 | 59 MB |