Conversation
1. Test function patterns survive encoding 2. Test format patterns 3. Test version pattern
Right order is (/ (+ 4 ccbits) 8). This caused over-reservation of three bytes. Also improved test to cover more versions.
This was a byte left over from initial development. Kinda slipped through all these years. It didn't cause a bad decoding but wasted a byte.
That way qrencode.elc gets rebuild instead of accidentally testing a stale version.
* Split penalties into separate functions for each rule to simplify testing * Fix skipping last col / row (added test) * Fix dark-light ratio calculation (added test) * More tests
This didn't impact anything due to symmetry but better not have hidden issues.
Only `byte` mode is supported. But still better to pass it all the way through.
Using `vector` instead of a literal means the byte compiler will compile the lambdas. Speeding up execution of the code.
This makes it explicit that the test was skipped.
The standard specifies a step order but actually step 7 and 6 seem to be out of order. When calculating penalties and picking the right mask (step 6) the version/format information (step 7) should be included. This is now fixed.
Use cond instead of pcase which means we don't need the `qrencode--unused` hack. Also enforce a valid mode is set.
Remove unnecessary save-excursion and move pop-to-buffer out of with-current-buffer.
The previous version was generated with a very early version of the code that didn't properly implement penalties. This version should be better up to standard.
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.
No description provided.