Repository navigation
rfc9842: extract DczCodec, fixing decodeDcz duplication - #124
Merged
Merged
Conversation
DczTestServer.compressDcz and the byte-for-byte-identical decodeDcz duplicated in Rfc9842ClientDemo and PerfTestDemo now live as DczCodec.compress/decompress -- one shared Arena-based codec instead of three copies, and named/shaped as actual counterparts of each other (compress/decompress, same parameter order: bytes, context, digested dictionary, AvailableDictionaryHeader) rather than the previous compressDcz/decodeDcz pairing, whose verbs and parameter order didn't match. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
dfa1
force-pushed
the
rfc9842-dcz-codec
branch
from
September 17, 2026 20:26
fc4edcf to
f2e9ed9
Compare
…undary noClasses().should().dependOnClassesThat().resideInAnyPackage(java.net.., java.nio.channels.., javax.net..) over the module's target/classes -- the layer-1 dcz codec (Rfc9842Frame, the header types, Sfv, Rfc9842Negotiation) is meant to be pure framing/parsing/hashing with no socket of its own, with the actual HTTP client/server confined to the test-only demo package. Verified the rule actually fails by temporarily importing java.net.URI into DictionaryIdHeader, then reverted. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The only existing mention of zstd-rfc9842 was a one-line pointer at the demo classes -- no Maven coordinate, no code showing the actual public API (Rfc9842Frame.wrap/unwrap, AvailableDictionaryHeader, UseAsDictionaryHeader, Rfc9842Negotiation). Adds a server/client quickstart in the same style as the top-level Quickstart section, and notes the sans-io boundary the new ArchUnit rule enforces. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The README's RFC 9842 section carried the how-to walkthrough, the type reference, and the sans-io rationale all in one place -- everything the Diátaxis-organized docs/ set exists to split apart, and rfc9842 had zero coverage there. Moves the server/client code to a how-to.md recipe, the type table and Maven coordinate to reference.md, and the sans-io/one-type rationale to explanation.md; README keeps a short paragraph pointing into both. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
dfa1
added a commit
that referenced
this pull request
Sep 18, 2026
The Unreleased rfc9842 entry covered the module's introduction but not what #124 added on top: the ArchUnit rule enforcing no java.net/ java.nio.channels/javax.net dependency, and the how-to/reference/ explanation docs. Co-Authored-By: Claude Sonnet 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.
Summary
Closes #122.
DczTestServer.compressDczand the byte-for-byte-identicaldecodeDczduplicated inRfc9842ClientDemoandPerfTestDemonow live asDczCodec.compress/decompress— one sharedArena-based codec instead of three separate copies.compress/decompress, identical parameter order: bytes, context, digested dictionary,AvailableDictionaryHeader) — the previouscompressDcz/decodeDcznaming didn't even share a verb root, and their parameter orders didn't match.Arena,MemorySegment,JAVA_BYTE,Rfc9842Frame,ZstdFrame,ZstdByteSize) from the three files that no longer touch native memory directly for this.Test plan
mvn -pl rfc9842 test— full suite passesmvn -pl rfc9842 validate javadoc:javadoc— checkstyle + javadoc cleanmvn test-compile— clean (learned from the last PR not to scope verification to one module)ServerDemo+Rfc9842ClientDemo(dcz round trip decodes correctly) andPerfTestDemo(byte counts match the pre-refactor baseline exactly:dcz263.3 avg bytes/req)🤖 Generated with Claude Code