Skip to content

Split blocks when separate trees reduce encoded size - #38

Closed
rafambn wants to merge 2 commits into
dev-1.1.0from
agent/block-split
Closed

rafambn wants to merge 2 commits into
dev-1.1.0from
agent/block-split

Conversation

@rafambn

@rafambn rafambn commented Sep 9, 2026 •

Copy link
Copy Markdown
Owner

Compare each block with two blocks divided at its midpoint token boundary, including their Huffman headers and stored-block alignment. Emit the smaller plan and preserve final-block flags.

Map tiles are 1.54% smaller at level 6 and 1.91% smaller at level 9. Across all fixtures the weighted reduction is only 0.006–0.007%, with no size regression in 70 corpus/level cases. Planning adds work: the final development JVM run measured the small model at 0.116 ms versus 0.067 ms before. Text timing is unstable across unchanged-baseline forks, so its single-fork comparison is provisional.

Linux JVM tests, 100% instruction/branch coverage verification and all 70 JDK/KFlate round trips passed. Tests cover exact block ends and unavailable-source behavior; the redundant invalid-midpoint guard is removed. Raw timings, sizes and saved Kompress comparisons are in performance/2026-09-09-split/RESULTS.md.

Independent PR against dev-1.1.0. The stored-block alignment helper overlaps #33 and must be deduplicated if both are merged.

@rafambn rafambn closed this Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant