Repository navigation
feat: count how a peer compressed its first batches - #19
Merged
Merged
Conversation
Falcon rules1 warning(s)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CompressedNetworkPeernow counts, over the first 64 batches a peer sends, how they were compressed. A server can read the counts withgetBatchTraits().What is counted:
The game's sender (
sub_1404C8960in the 1.26.60 client) sends a batch below the threshold as it is, and deflates the others raw at level 7 with memory level 8, in one call (sub_140734E70), with stock zlib 1.3.1.The comparison only runs when the local zlib writes the reference bytes for a fixed input, so a drop-in replacement such as zlib-ng turns it off instead of giving wrong counts. zlib 1.2.12 and 1.3.1 were both checked against that input. Batches over 256 KiB are not compared.
Limit: zlib at a neighbouring level (6) often writes the same bytes as level 7, so this mostly tells other deflate implementations apart.
New test
batch-traits. I ran it against the library built in Falcon's tree, not through this repository's own CMake.AI disclosure
Written by Claude Fable 5.2 (research in the client with IDA, code, test).