-
Notifications
You must be signed in to change notification settings - Fork 505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NHA2: Decode CS2 store data #1441
Conversation
Adds support for LZMA-decoded Binary KV to NHA2 Adds support for 0x0B (AlternateEnd) to KeyValue
SteamKit2/SteamKit2/Util/LzmaUtil.cs
Outdated
/// <summary> | ||
/// Internal helper to decode data blobs with the 'LZMA' magic header. | ||
/// </summary> | ||
public static class LzmaUtil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would avoid exposing this publicly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd need InternalsVisibleTo for NHA2 then, or to move the whole thing into NHA2.
If GC are using it at the protocol level somehow then it would be needed by SK2 clients.
If they're not and its game-specific then I'd be on the fence about including it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just put it in NH.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then I need a second copy of the LZMA SDK to get at the Decoder
. 😞
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's annoying. InternalsVisibleTo then? :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, seems like the least evil option for now
This needs tests but PR is up for people to build themselves or use GHA artefacts.
Addresses the issue described in discussion #1440.
The payload is a binary blob with the four-byte magic
LZMA
. This doe not seem to be a standard but is possibly a Valve creation, as seen elsewhere in ValveResourceFormat.It also uses a different type of KeyValues binary serialisation, using
AlternateEnd
from VBKV as seen here: ValveResourceFormat/ValveKeyValue#9These changes probably need some new tests for the modified KV logic, and ideally also for the new LzmaUtil class.