Project Nayuki
46b6425838
Simplified some logic in Java QrSegmentAdvanced using Java SE 8 streams and lambdas.
2018-10-03 21:10:13 +00:00
Project Nayuki
18ff8dc0e5
Refactored Java QrSegmentAdvanced to move a piece of logic to a new function.
2018-10-03 21:01:23 +00:00
Project Nayuki
012d469ca5
Inlined some Java functions - refactored QrSegmentAdvanced, increased visibility of a constant in QrSegment.
2018-10-03 20:59:02 +00:00
Project Nayuki
cdd1d0150d
Tweaked BitBuffer.appendBits() comment and code in a few language versions.
2018-10-02 08:56:07 +00:00
Project Nayuki
34408d66aa
Tweaked the BitBuffer class top-level comment in all languages except C.
2018-10-02 00:21:19 +00:00
Project Nayuki
6903d28c90
Swapped {dy,dx} variables in commutative operations for clarity, in all languages.
2018-09-17 03:51:57 +00:00
Project Nayuki
87868d7920
Renamed loop variables in QrCode.{drawFinderPattern(),drawAlignmentPattern()} for clarity, in all languages (but somewhat differently in C).
2018-09-17 03:47:58 +00:00
Project Nayuki
e70b3b347f
Fixed incorrect constant in QrSegmentAdvanced.computeCharacterModes() (which caused kanji mode to be used less often than it should be).
2018-09-03 04:38:36 +00:00
Project Nayuki
f1ec2a8f43
Tweaked QrCode.getPenaltyScore() to use binary literals for clarity, for Java (SE 7+) and TypeScript (ES6+).
2018-08-31 19:50:40 +00:00
Project Nayuki
957219dc91
Reformatted some whitespace for alignment in all language versions.
2018-08-31 17:57:57 +00:00
Project Nayuki
3e642cf468
Simplified QrSegment.makeNumeric() logic in {Java, JavaScript, TypeScript, Python} language versions.
2018-08-31 17:54:39 +00:00
Project Nayuki
e7854eb797
Reformatted some whitespace for alignment in all language versions.
2018-08-31 17:23:16 +00:00
Project Nayuki
3ead3dbb84
Updated up to 8 comments in all language versions, but somewhat differently in each language.
2018-08-28 21:08:00 +00:00
Project Nayuki
e9e7363c55
Tweaked Java comments and added assert.
2018-08-28 20:27:51 +00:00
Project Nayuki
362d552c92
Simplified QrSegment.Mode.numCharCountBits() in all language versions.
2018-08-28 20:11:05 +00:00
Project Nayuki
16b59e207d
Deleted unnecessary version range check in two private functions, in all language versions except Rust.
2018-08-28 19:45:09 +00:00
Project Nayuki
9c670453a8
Tweaked small pieces of code.
2018-08-28 19:32:44 +00:00
Project Nayuki
4ede209d9a
Changed QrCode.getAlignmentPatternPositions() from static function to instance method, tweaked its logic, and updated comment - in all languages but differently in each.
2018-08-28 19:10:47 +00:00
Project Nayuki
565f1d7481
Removed static imports from Java QrSegmentAdvanced for clarity.
2018-08-28 18:34:06 +00:00
Project Nayuki
8800acf003
Revamped Java QrSegmentAdvanced code to implement optimization of kanji text, and simplify existing algorithms.
2018-08-28 18:31:44 +00:00
Project Nayuki
ce1f7d4c4d
Refactored handling of zero-length text in Java QrSegmentAdvanced.
2018-08-28 17:49:24 +00:00
Project Nayuki
b3a34bdd3d
Upgraded some of Java QrSegmentAdvanced's private methods to handle full Unicode code points instead of UTF-16 code units.
2018-08-28 16:54:58 +00:00
Project Nayuki
a2fe36e1c0
Added an inner class import to Java QrSegmentAdvanced to shorten names.
2018-08-28 16:51:20 +00:00
Project Nayuki
4c882636bb
Updated comments for QrSegment.getTotalBits() in all language versions, but somewhat differently per language.
2018-08-28 16:36:07 +00:00
Project Nayuki
719caf4d99
Added private helper method to Java QrSegmentAdvanced.
2018-08-28 07:52:42 +00:00
Project Nayuki
0bf2d3306b
Simplified some code.
2018-08-28 07:18:56 +00:00
Project Nayuki
669585590b
Added an assertion to QrCode.encodeSegmentsAdvanced() in all language versions.
2018-08-28 06:22:22 +00:00
Project Nayuki
98d1f0cc91
Reformatted a comment in all language versions (related to commit 5073db4487
).
2018-08-26 03:55:03 +00:00
Project Nayuki
5073db4487
Somewhat simplified black/white balance penalty calculation in all language versions.
2018-08-26 03:20:12 +00:00
Project Nayuki
7d7a9b4820
Tweaked some Java code.
2018-08-26 02:33:49 +00:00
Project Nayuki
1edde0571a
Simplified some Java code regarding Objects.requireNonNull().
2018-08-26 02:33:36 +00:00
Project Nayuki
c8f05d24d1
Tweaked comments about inclusive ranges so that the word is consistently parenthesized.
2018-08-26 02:33:20 +00:00
Project Nayuki
ccd571624e
Tweaked QrCode constructor to dispose of the isFunction array in all languages except C, but somewhat differently in each language.
2018-08-26 02:17:47 +00:00
Project Nayuki
c86dacacb7
Tweaked code and comment in QrCode.encodeSegments() in all language versions.
2018-08-26 02:03:27 +00:00
Project Nayuki
c9553ead71
Simplified code in QrCode.drawFunctionPatterns() in all language versions, but differently in Python.
2018-08-26 01:49:27 +00:00
Project Nayuki
0ee6c41c9c
Renamed QrCode.appendErrorCorrection() to addEccAndInterleave() in all language versions.
2018-08-26 01:33:06 +00:00
Project Nayuki
cf0dbd4d0f
Refactored control flow to reduce nesting.
2018-08-25 23:16:49 +00:00
Project Nayuki
78e234fb0d
Simplified Java QrSegmentAdvanced.splitIntoSegments() to reduce redundancy.
2018-08-25 23:15:27 +00:00
Project Nayuki
432f3e0fed
Added helper function to Java QrSegmentAdvanced to clarify code.
2018-08-25 23:05:31 +00:00
Project Nayuki
ecfa0a83c1
Simplified miscellaneous Java and Python application code.
2018-08-22 21:25:46 +00:00
Project Nayuki
8d6dcf2631
Simplified and reformatted QrCode.getAlignmentPatternPositions() in different ways in all language versions.
2018-08-22 20:58:16 +00:00
Project Nayuki
f5be9d38f6
Updated Javadoc and informal comments in Java code.
2018-08-22 20:39:45 +00:00
Project Nayuki
bc372054e2
Tweaked Java QrCode.toSvgString() to avoid overflow entirely.
2018-08-22 20:34:38 +00:00
Project Nayuki
6f45d3b573
Clarified code in QrCode.drawVersion() in 4 language versions.
2018-08-22 19:56:24 +00:00
Project Nayuki
62e73f787a
Renamed variable in QrCode.drawVersion() in all language versions.
2018-08-22 19:52:50 +00:00
Project Nayuki
23ae555dde
Added variable for clarity to QrCode.drawFormatBits() in all language versions.
2018-08-22 19:48:29 +00:00
Project Nayuki
ea29e58e9c
Simplified Java code to use StringBuilder method chaining.
2018-08-22 19:47:27 +00:00
Project Nayuki
f3ba9c0837
Simplified QrCode.toSvgString() loop ranges in all language versions except C.
2018-08-22 19:32:03 +00:00
Project Nayuki
62930ef455
Updated and added 5 comments in all language versions except C.
2018-08-22 19:23:40 +00:00
Project Nayuki
d1f53e6e7d
Added and updated 4 comments in all language versions.
2018-08-22 19:22:00 +00:00
Project Nayuki
a2977e6351
Refactored a Java method to reduce indirection.
2018-08-22 18:33:28 +00:00
Project Nayuki
bf62065700
Simplified and clarified small pieces of Java code, without changing behavior.
2018-08-22 18:33:01 +00:00
Project Nayuki
0e2ecff58e
Tweaked Java code to convert most explicit assertion checks to native assert statements, for compactness and because the code quality ensures that the checks shouldn't fail in normal usage.
2018-08-22 18:15:15 +00:00
Project Nayuki
d8d2da49e4
Tweaked Javadoc to use the word "constructs" instead of "creates" for constructors.
2018-08-22 18:05:43 +00:00
Project Nayuki
b756fcd8b1
Tweaked Java BitBuffer code to add size overflow checks.
2018-08-22 18:03:17 +00:00
Project Nayuki
cc939b2ebe
Tweaked Java code to prevent arithmetic overflow for huge input data.
2018-08-22 17:57:40 +00:00
Project Nayuki
31ba90d0db
Tweaked QrCodeGeneratorDemo Java code to use QrSegmentAdvanced.makeKanji() instead of hard-coding the data words, while maintaining identical output image.
2018-06-24 20:53:28 +00:00
Project Nayuki
49d9301b77
Updated Javadoc text for QrSegmentAdvanced related to kanji encoding.
2018-06-24 20:51:36 +00:00
Project Nayuki
67ebd5215d
Renamed function in QrSegmentAdvanced to makeKanji(), for consistency with other static factories.
2018-06-24 20:51:12 +00:00
Project Nayuki
c0b684bc18
Tweaked comment for kanji demo in multiple languages, so that it corresponds to the order in the sample text string.
2018-06-24 03:33:22 +00:00
Project Nayuki
80797f449e
Tweaked pluralization in section comments, in multiple languages.
2018-06-23 16:21:40 +00:00
Project Nayuki
693304b8c3
Updated all language versions to add getBit() helper function and refactor existing arithmetic code to use it.
2018-04-13 19:48:59 +00:00
Project Nayuki
9728f19f59
Added integer overflow checks to toSvgString() in Java, C++, Rust code; added checks to toImage() in Java code.
2018-02-26 20:29:25 +00:00
Project Nayuki
0f73afa367
Updated Java worker program to close input stream and reduce indentation.
2017-11-23 06:27:20 +00:00
Project Nayuki
5a5626edb2
Added integer constants for QR Code min/max version numbers, made use of new constants in library and example applications, in all language versions except C.
2017-10-23 04:42:53 +00:00
Project Nayuki
6a71e09f72
Added/tweaked comments and blank lines in demo programs of all language versions except JavaScript.
2017-10-23 03:51:13 +00:00
Project Nayuki
b86466ecd5
- Deleted constructors/functions/code for remasking existing QrCode object (due to doubtful real-world usefulness): C++, Java, JavaScript, Python, Rust.
...
- Tweaked code and comments due to feature removal: JavaScript, Python.
- Updated demo programs to reflect new API usage and add new example: C, C++, Java, Python, Rust.
2017-10-23 03:45:24 +00:00
Project Nayuki
9c1a25aba4
Changed QrCode.getModule() in {Java, JavaScript, Python, C++} language versions to return Boolean instead of 0/1 - to match {C, Rust} language versions - and updated comments and usages.
2017-08-31 20:39:29 +00:00
Project Nayuki
3d4d941da3
Updated a few documentation comments.
2017-08-31 20:21:32 +00:00
Project Nayuki
272ca8bb54
Split long lines in various {Java, JavaScript, Python, C++, C, Rust} code, without changing behavior.
2017-08-31 20:19:41 +00:00
Project Nayuki
dfe960aa60
Split a long line in a comment in {Java, JavaScript, C++} language versions, without changing wording.
2017-08-31 20:19:17 +00:00
Project Nayuki
1d5ceab068
Split long lines in a comment in {Java, JavaScript, C++, Python, Rust} language versions, without changing wording.
2017-08-31 20:18:41 +00:00
Project Nayuki
2fd05cc7ef
Split long lines in 2 comments in {Java, JavaScript, Python, C++} language versions, without changing wording.
2017-08-31 20:13:05 +00:00
Project Nayuki
d8b66fcbf1
Updated 2 API documentation comments in {Java, JavaScript, Python, C++} language versions, though not identically.
2017-08-31 19:51:31 +00:00
Project Nayuki
4d6185a5d3
Reorganized a chunk of code in worker program of {Java, Python, C, C++} language versions, without changing behavior.
2017-08-28 04:03:05 +00:00
Project Nayuki
6dfb842afa
Tweaked Java and C++ code and comment slightly.
2017-08-26 18:57:52 +00:00
Project Nayuki
6b2cfd98dc
Fixed the upper limit of ECI values to be more permissive according to the spec, in almost all language versions except C.
2017-08-26 18:43:54 +00:00
Project Nayuki
8997da4651
Converted Java BitBuffer comments to Javadoc, updated related comments in most other language versions.
2017-08-18 03:36:00 +00:00
Project Nayuki
97e0388cb7
Simplified the argument check in BitBuffer.appendBits() by tightening the input range, also removed some parentheses.
2017-08-18 03:33:03 +00:00
Project Nayuki
7e512971df
Fixed some arithmetic checks in Java and C code.
2017-08-18 03:31:35 +00:00
Project Nayuki
16f504be67
Inlined the 'size' variable in getAlignmentPatternPositions() in 3 language versions.
2017-08-18 00:44:24 +00:00
Project Nayuki
49f6538682
Updated a comment in getAlignmentPatternPositions() in most language versions (except JavaScript).
2017-08-18 00:39:30 +00:00
Project Nayuki
3db1e2d9b1
Renamed 'packedKanjiData' constant in demo programs.
2017-08-17 21:52:08 +00:00
Project Nayuki
ff0eed8700
Tweaked C++ and Java demo code for clarity.
2017-08-17 21:37:04 +00:00
Project Nayuki
f6e1276b08
Updated Java QrSegment fields from array to BitBuffer, changed methods and updated code that depended on this design.
2017-08-17 20:34:52 +00:00
Project Nayuki
05d470fcca
Added BitBuffer-based constructor to Java QrSegment class, updated existing library and demo code to use it.
2017-08-17 20:28:28 +00:00
Project Nayuki
7a2555816b
Updated Java BitBuffer code to add methods and make the class public.
2017-08-17 20:12:42 +00:00
Project Nayuki
493d3c31f2
Slightly simplified Java code by making BitBuffer use BitSet instead of manual array manipulation.
2017-08-17 20:08:28 +00:00
Project Nayuki
d785ecb598
Simplified the no-stroke declaration in SVG output code - in Java, C++, JavaScript, Python language versions.
2017-07-26 20:34:29 +00:00
Project Nayuki
7727d371e1
Simplified Java and Python demo code slightly.
2017-05-11 20:31:42 +00:00
Project Nayuki
a610a3d8df
Added support for making Extended Channel Interpretation (ECI) segments - in Java, C++, JavaScript, and Python language versions.
2017-05-08 18:04:10 +00:00
Project Nayuki
0482a1ec5b
Simplified a small bit of variables and logic of QrCode.getPenaltyScore() in all language versions, but in a subtly different way per language.
2017-05-08 07:30:53 +00:00
Project Nayuki
52694b5327
Simplified/deoptimized Java and JavaScript code to use string search instead of lookup table for alphanumeric mode encoding, without changing functionality. This is similar to the previous commit 106e31d9c7
. By comparison, the Python code had always used a proper dictionary, and the C code implemented string search from the start.
2017-05-08 06:20:50 +00:00
Project Nayuki
50c1a6b8af
Simplified a few lines of code in constructor of ReedSolomonGenerator in all language versions.
2017-05-08 05:21:05 +00:00
Project Nayuki
17e0155500
Added local variable to appendErrorCorrection() in {Java, C++, JavaScript, Python} language versions to reduce code repetition and synchronize with C version.
2017-05-06 17:19:00 +00:00
Project Nayuki
652ee37f59
Updated comment for QrCode.getNumRawDataModules() in all language versions.
2017-05-06 11:51:21 +00:00
Project Nayuki
b0123fee3d
Reduced lines in copyright notice of each source file (related to commit 4bba4c03ed
).
2017-04-24 20:41:54 +00:00
Project Nayuki
88ad854fd3
Added hand-crafted example of kanji mode text encoding to C++, Java, Python demo programs.
2017-04-21 16:59:13 +00:00
Project Nayuki
ac91c54ce1
Fixed QrSegment.getTotalBits() Java logic to catch integer overflow correctly (related to the C++ fix in commit 873652a82f
).
2017-04-21 15:37:59 +00:00
Project Nayuki
6c5f8d087b
Added test worker programs for Java, Python, C; added batch tester in Python.
2017-04-21 00:15:07 +00:00
Project Nayuki
2ffc439340
Updated comments in drawFunctionPatterns() of all other language versions to synchronize with C code.
2017-04-20 06:39:59 +00:00
Project Nayuki
7c173b79b4
Simplified code for 'upward' variable in all language versions, without changing behavior.
2017-04-20 04:18:22 +00:00
Project Nayuki
3e634c9f26
Renamed variable 'upwards' to 'upward' in drawCodewords() of all language versions, without changing behavior.
2017-04-20 04:06:46 +00:00
Project Nayuki
f020833cd4
Simplified code in all language versions of the library (C, C++, Java, JavaScript, Python) and reduced table size, without changing behavior.
2017-04-19 23:06:40 +00:00
Project Nayuki
12360bec33
Added and updated a few comments in QrSegmentAdvanced.
2017-02-10 03:31:03 +00:00
Project Nayuki
e062a386d0
Deleted copyright year in all source files, updated year in readme document.
2017-02-10 03:19:39 +00:00
Project Nayuki
8033f9cec0
Fixed a constant value in QrSegmentAdvanced, which affects how the optimal segment switching is selected.
2017-02-10 03:17:18 +00:00
Project Nayuki
bd470926ca
Tweaked all Java code to replace explicit null checks with calls to Objects.requireNonNull() (requires Java SE 7+).
2017-01-25 01:13:57 +00:00
Project Nayuki
18834e548b
Deleted a trailing whitespace.
2016-10-05 17:36:45 +00:00
Project Nayuki
ff9fbba9cf
Renamed loop variable from j to i in ReedSolomonGenerator.getRemainder() in most language versions.
2016-06-14 17:10:55 +00:00
Project Nayuki
a9a5cdbb58
Updated documentation comments for 3 functions in all language versions.
2016-05-24 18:41:34 +00:00
Nayuki Minase
2de9610756
Added comment about remainder bits in QR symbol in all language versions.
2016-05-07 19:02:11 +00:00
Nayuki Minase
0f71a9f818
Added an experimental advanced QR segment encoder class in Java for kanji mode encoding and optimal segment mode switching, changed a statistics helper function in QrCode.java to package-private to support the new class.
2016-04-21 21:42:35 +00:00
Nayuki Minase
85703de600
Fixed subtle logic bug in QrSegment.java to match the API promise of a fully mutable list being returned.
2016-04-21 18:39:47 +00:00
Nayuki Minase
4fcf02d1f9
Added comments and renamed variables in QrCode.appendErrorCorrection() in all language versions.
2016-04-21 01:57:58 +00:00
Nayuki Minase
fc5f11b3b2
Tweaked line breaking, whitespace, and declaration ordering without changing behavior.
2016-04-20 20:50:42 +00:00
Nayuki Minase
f63f890235
Changed ~4 members to package-private in all language versions, updating code in Java version but only updating comments in JavaScript, Python, C++ versions.
2016-04-20 20:40:49 +00:00
Nayuki Minase
be316029aa
Added and updated code comments for members (mostly) and within functions (a few), in all languages.
2016-04-20 20:27:41 +00:00
Nayuki Minase
1df147943e
Tweaked section comments and blank lines for better uniformity across all language versions.
2016-04-20 20:19:57 +00:00
Nayuki Minase
fc705efac3
Added white background rectangle to SVG XML code output, in all language versions.
2016-04-18 20:44:02 +00:00
Nayuki Minase
5692e951dd
Revamped QrCode.encodeSegments() to add parameters to make a much richer API, in all language versions; updated JavaScript demo script to handle new semantics.
2016-04-16 03:53:58 +00:00
Nayuki Minase
ca7e7a60a7
Moved QrCode.encodeTextToSegment() to QrSegment.makeSegments() and changed the function's code somewhat, in all language versions; updated JavaScript demo script to handle new semantics.
2016-04-16 01:44:24 +00:00
Nayuki Minase
3fda371340
Tweaked the comment for QrCode.encodeTextToSegment() in most language versions.
2016-04-16 01:14:22 +00:00
Nayuki Minase
bd52bc3252
Moved Java code into appropriate directory structure for packages.
2016-04-15 23:59:53 +00:00
Nayuki Minase
bc10146355
Moved all code into new subdirectories per programming language.
2016-04-15 02:58:02 +00:00