The maintained Windows implementation is ../dspack_cpp.cpp, built as CLI and GUI by ../build_dspack_cpp.ps1.
MappedFileopens the source archive read-only and maps it into memory.Pack::Parse()validates the common index fields, records, string table, and payload bounds.- Path helpers resolve names and reject traversal; C++ also rejects rooted/drive paths and output collisions within one archive.
LzdBlock()/LzdResource()decode LZD.ZlibApi/ZlibResource()decode ZLib through a localzlib1.dll.ExtractSingleArchive()is shared by the GUI and batch CLI; it dispatches files to a bounded worker pool.- The Win32 GUI uses background workers, cancellation, posted progress updates, and the Windows folder picker.
See C++ GUI And CLI for build, usage, runtime dependency, and validation.
../dspack.py is the older, slower reference implementation. It has a single-archive CLI, no GUI, and no native worker pool. It remains for readable algorithm study, comparison, and its experimental 7-Zip LZX bridge. The LZX bridge has not been checked against a real FEAR 3 LZX member. Do not assume Python-only behavior exists in C++.
- One LZD call captured from the live game in x32dbg produced output with identical SHA-256 in Python and the game buffer.
- C++
Boot.dsPack(2,464 entries) andPatch.dsPack(40 entries) matched previous extracted references byte-for-byte. - Selected large LZD resources from
Resource.dsPackmatched Python output byte-for-byte. - Synthetic raw and wrapped ZLib fixtures matched original bytes.
- No installed archive contained internally compressed ZLib or LZX entries. ZLib has synthetic-fixture coverage only; LZX has no real-game end-to-end test.
- A warm-cache Boot extraction measured 0.58 s C++ vs 19.0 s Python on the development machine, approximately 33x in that run. This is illustrative only.
- Only
.dsPackv107/v108. - Common indexes are parsed; auxiliary engine lookup structures are not fully reconstructed.
- C++ supports LZD/ZLib, not LZX. Python's LZX bridge is experimental.
- Audio conversion, archive writing/recompression, timestamp restoration, and exact duplicate-priority behavior are out of scope.
MiniPackis a filesystem/mount behavior, not compression.