-
-
Notifications
You must be signed in to change notification settings - Fork 625
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use some techniques sourced from Netty's
ProtobufVarint32FrameDecoder
The primary change was restricting the VarInt reads from the full 35-bit range to the truncated 21-bit range Minecraft uses for packet framing. As a result we can remove the five-byte VarInt special case. The unrolled 3-byte read would also be sufficient to read packets, but it doesn't hurt to try and squeeze out some extra performance.
- Loading branch information
Showing
2 changed files
with
93 additions
and
51 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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