Conversation
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.
Level 9 currently prices every token with fixed Huffman codes even when the encoder chooses dynamic trees. Try one refinement using prices from the first parse, rebuild the frequency estimate, and restore the original path unless the estimate improves.
Actual level 9 output across seven fixtures is 1.263% smaller, including 2.475% on Maltese and 0.899% on text, with no fixture size regression. This adds parsing work and allocations; final development JMH measured Maltese at 1.65 s versus the 1.21 s baseline. Raw samples, sizes and trusted saved Kompress comparisons are in
performance/2026-09-09-dynamic/RESULTS.md.The estimate covers a parser window rather than each emitted block, so arbitrary inputs can still regress. Replace the Huffman builder's 25001 sentinel to support window frequencies, and reject packed two-byte no-match results in the window-crossing fallback. Integration testing exposed that otherwise dynamic prices could select length two and emit a length-three token.
Linux JVM tests, 100% instruction/branch coverage, and all 70 corpus/level round trips through JDK and KFlate passed. Levels 0–8 are unchanged. The combined candidate also passes all 70 cases. Independent PR targeting
dev-1.1.0; it overlaps #35 and requires resolving the parser changes if both are adopted.