Repository navigation
Conversation
- VarInt/VarLong encode on the stack and write in one call; add `encode()` - RawPacket reads no longer zero the buffer first - uncompress reuses the inflated buffer; add consuming `into_uncompressed` - zlib compress/decompress reuse per-thread state, no 32 KiB BufReader - add `ByteArray` for bulk VarInt-prefixed bytes - cap Vec<T> preallocation by bytes instead of element count - CFB8 `encrypt_in_place`/`decrypt_in_place`; sync write half reuses its buffer Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Additive, non-breaking performance pass; bumps to 2.4.0.
VarInt/VarLongare encoded into a stack buffer and written with a single call instead of one write per byte. New publicencode().read_sync/read_asyncdocs now recommend wrapping sockets in aBufReader.RawPacket::read_*no longer zero-fill before reading;uncompressreuses the inflated buffer for the payload; new consumingRawPacket::into_uncompressedavoids copying uncompressed bodies.compress_zlib/decompress_zlib_limitedreuse per-thread deflate/inflate state and drop the extra 32 KiBBufReader;Vec<T>preallocation is capped at 64 KiB by bytes, not 4096 elements.ByteArray, wire-compatible withVec<u8>but read/written in bulk; CFB8encrypt_in_place/decrypt_in_place; syncCfb8WriteHalfreuses its scratch buffer.decompress_zlib_limitednow return an error.Tests: new
tests/bulk_io.rsplus compression tests (into_uncompressed parity, truncated stream, repeated state reuse). The trybuild snapshot changes only becauseByteArraynow shows in the implementors list.Locally verified: all 8 feature combinations with
-D warnings, clippy, fmt, MSRV 1.89, nightly docs.🤖 Generated with Claude Code