Skip to content

fix: count the README example in bytes, and stop the figures drifting - #6

Merged
maxgfr merged 1 commit into
mainfrom
byte-count
Sep 10, 2026
Merged

maxgfr merged 1 commit into
mainfrom
byte-count

Conversation

@maxgfr

@maxgfr maxgfr commented Sep 10, 2026

Copy link
Copy Markdown
Owner

The See-it panel said 756 bytes, which is the character count of a view containing multi-byte characters. The byte count is 760. The input size and the percentage were already correct, and the other eight rows came from a bench report that counts bytes, so this was the only wrong figure.

Counting characters where bytes were meant is easy to do and invisible in review, so this also adds scripts/check_readme.py: it rebuilds all nine fixtures behind the reduction table, runs the compressor, and fails if any input, output or percentage has drifted from what the binary produces. The checker's negative case was verified, a deliberately wrong figure exits 1, and CI runs it on both platforms.

The See-it panel said 756 bytes. That is the character count of a view
containing multi-byte characters; the byte count is 760. The input and
the percentage were already right, and every other figure came from a
bench report that counts bytes, so this row was the only wrong one.

Counting characters where bytes were meant is easy to do and invisible
in review, so scripts/check_readme.py now rebuilds all nine fixtures
behind the reduction table, runs the compressor, and fails if any input,
output or percentage has drifted. Its own negative case was checked: a
deliberately wrong figure exits 1. CI runs it on both platforms.
@maxgfr
maxgfr merged commit 7448feb into main Sep 10, 2026
6 checks passed
@maxgfr
maxgfr deleted the byte-count branch September 10, 2026 21:13
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