Repository navigation
Preserve per-connection WebSocket compressor selection - #1955
Merged
uNetworkingAB merged 1 commit intoOct 5, 2026
Merged
uNetworkingAB merged 1 commit into
uNetworkingAB merged 1 commit into
Conversation
The 3 KB compatibility check used a bitwise overlap test. Every dedicated compressor setting shares bits with `DEDICATED_COMPRESSOR_3KB`, so the check silently replaced larger per-connection compressors with the 3 KB setting, which uses a 512-byte window and `memLevel` 1. Mask the configured options with `CompressOptions::_COMPRESSOR_MASK` before comparing them with `DEDICATED_COMPRESSOR_3KB`. This keeps the 3 KB compatibility handling while allowing larger dedicated compressors to use their negotiated settings. Replaying 1,500 recorded stage frames (7.8 MB) produced these compression ratios: DEDICATED_COMPRESSOR_256KB 1.64x before, 7.90x after DEDICATED_COMPRESSOR_8KB 1.64x before, 3.00x after DEDICATED_COMPRESSOR_3KB 1.64x before, 1.64x after SHARED_COMPRESSOR 4.65x before, 4.65x after Every frame decompressed byte-for-byte after the change. Contributed by Spiderware (https://spiderware.gg).
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.
The 3 KB compatibility check used a bitwise overlap test. Every dedicated compressor setting shares bits with
DEDICATED_COMPRESSOR_3KB, so the check silently replaced larger per-connection compressors with the 3 KB setting, which uses a 512-byte window andmemLevel1.Mask the configured options with
CompressOptions::_COMPRESSOR_MASKbefore comparing them withDEDICATED_COMPRESSOR_3KB. This keeps the 3 KB compatibility handling while allowing larger dedicated compressors to use their negotiated settings.Replaying 1,500 recorded stage frames (7.8 MB) produced these compression ratios:
DEDICATED_COMPRESSOR_256KB 1.64x before, 7.90x after
DEDICATED_COMPRESSOR_8KB 1.64x before, 3.00x after
DEDICATED_COMPRESSOR_3KB 1.64x before, 1.64x after
SHARED_COMPRESSOR 4.65x before, 4.65x after
Every frame decompressed byte-for-byte after the change.
Developed with the help of Claude Code and OpenAI Codex.
Contributed by Spiderware (https://spiderware.gg).