ZXing ("Zebra Crossing") barcode scanning library for Java, Android
Find a file
AlexGeller1 128775149b
Add support for EncodeTypeHint.CHARACTER_SET for compacted QR-Codes (#1450)
* Added experimental version of QR-Code compaction which can be activated via EncodeHintType.QR_COMPACT

* - Changed algorithm from recursive divide and conquer to iterative Dijkstra
- Performed the requested modifications.

* Added better debug output and better documententation of the algorithm

* - Added missing error handling in case of a failing assert
- Fixed typo in the documentation

* Fixed bug that the minimal encoder would fail with an internal error if the string to encode contained only characters from ISO-8859-1 and on or more character that is not defined in any of the ISO-8859 characters sets.

* Added unit tests

* - indented class and method comments
- fixed code indententation
- added vertical spacing in statement lists to separate locical blocks
- added comments to document some numeric constants
- commented out debug logging
- made class ResultNode final and all but the methods called by the
class Encoder private.

* - Fixed indentation and line length
- Improved comments

* Fixed line length

* Improved comments

* - Whitespace and comment style changes
- Replaced string concatentation with StringBuilder.append()
- Replaced Vector with ArrayList
- Made members that are ony modified in the constructor final
- Made other minor changes

* - Made more members final
- replaced assert by throwing an IllegalStateException

* Changed internal data representation to be based on java.util.LinkedList

* Removed uneccessary spaces and comments

* Improved the debug output (now produces a compacted graph)

* - Added code to exclude not supported ECIs
- Fixed regression that bits were incorrectly computed

* - Fixed regression that bits were wrongly computed
- Improved compaction
- added a commented proposal for unit test that makes use of the decoder to validate the encoded bits

* Removed useless comparisons

* Removed commented code

* Optimization: added code to cache the value of LinkedList.size().

* Added more test cases

* - Added support for EncodeTypeHint.CHARACTER_SET
- Added support to encode in all ISO-8859 character sets available on the platform
- Removed code that handles failing asserts

* - Replaced string switch case with HashMap lookup
- Reintroduced asserts

* - Replaced <code> with {@code}
- Changed indentation in comment
- Simplified code

* Improved documentation

* Added comment about decoding compatibility with zxing.

* - Made MinimalEncoder responsible of ensuring that the bits fit in the returned version.
- Removed asserts that throw NPE in case of falure.

* Restricted encoder to use only encodings defined in CharacterSetECI

* Improved clarity and readability of the algorithm and of the datastrutures used.
- Minimizing algorithm is based on immutable edges
- ResultList now contains exaclty one ResultNode per mode and possibly several as before

* Changed unit tests (forgotten in previous push)
2021-10-17 08:57:06 -05:00
.github Create codeql-analysis.yml 2020-11-18 12:09:06 -06:00
.reuse License and copyrights (#1281) 2020-05-07 09:06:26 -05:00
android Enforce line length and indent in checkstyle (#1448) 2021-10-05 15:49:47 -05:00
android-core Update dependencies and add one new test 2021-04-02 11:59:49 -05:00
android-integration Enforce line length and indent in checkstyle (#1448) 2021-10-05 15:49:47 -05:00
core Add support for EncodeTypeHint.CHARACTER_SET for compacted QR-Codes (#1450) 2021-10-17 08:57:06 -05:00
docs Set theme jekyll-theme-midnight 2020-10-01 08:34:53 -05:00
javase Minor code style updates to MinimalEncoder and a few other files ; minor dep updates 2021-10-12 21:06:05 -05:00
src Enforce line length and indent in checkstyle (#1448) 2021-10-05 15:49:47 -05:00
zxing.appspot.com Enforce line length and indent in checkstyle (#1448) 2021-10-05 15:49:47 -05:00
zxingorg Minor code style updates to MinimalEncoder and a few other files ; minor dep updates 2021-10-12 21:06:05 -05:00
.editorconfig Improve support for Macro PDF417 (#973) 2018-03-15 14:44:55 -05:00
.gitattributes Added .gitattributes to define how git handles the line endings 2014-07-17 20:36:16 +02:00
.gitignore Many more changes from recent IJ inspections 2018-09-03 15:18:54 -05:00
.travis.yml Not working ; disable ARM 2020-06-20 10:08:37 -05:00
AUTHORS Improve FinderPatternFinder.selectBestPatterns (#1158) 2019-04-18 06:42:52 -07:00
CHANGES Update CHANGES for 3.4.1; misc plugin updates 2020-09-29 11:23:54 -05:00
LICENSE Update jai-imageio license; remove unneeded gwt-servlet dep; update clirr 2015-09-25 11:25:51 +01:00
NOTICE Use JCommander for CommandLineRunner args 2015-05-03 20:49:10 +01:00
pom.xml Minor code style updates to MinimalEncoder and a few other files ; minor dep updates 2021-10-12 21:06:05 -05:00
README.md Remove reference to 'beta' quality formats 2020-07-15 15:14:10 -05:00

Project in Maintenance Mode Only

The project is in maintenance mode, meaning, changes are driven by contributed patches. Only bug fixes and minor enhancements will be considered. The Barcode Scanner app can no longer be published, so it's unlikely any changes will be accepted for it. There is otherwise no active development or roadmap for this project. It is "DIY".

Get Started Developing

To get started, please visit: https://github.com/zxing/zxing/wiki/Getting-Started-Developing

ZXing ("zebra crossing") is an open-source, multi-format 1D/2D barcode image processing library implemented in Java, with ports to other languages.

Supported Formats

1D product 1D industrial 2D
UPC-A Code 39 QR Code
UPC-E Code 93 Data Matrix
EAN-8 Code 128 Aztec
EAN-13 Codabar PDF 417
UPC/EAN Extension 2/5 ITF MaxiCode
RSS-14
RSS-Expanded

Components

Active

Module Description
core The core image decoding library, and test code
javase JavaSE-specific client code
android Android client Barcode Scanner
android-integration Supports integration with Barcode Scanner via Intent
android-core Android-related code shared among android, other Android apps
zxingorg The source behind zxing.org
zxing.appspot.com The source behind web-based barcode generator at zxing.appspot.com

Available in previous releases

Module Description
cpp C++ port
iphone iPhone client
objc Objective C port
actionscript Partial ActionScript port
jruby JRuby wrapper

ZXing-based third-party open source projects

Module Description
QZXing port to Qt framework
glassechidna/zxing-cpp port to C++ (forked from the deprecated official C++ port)
nu-book/zxing-cpp recent port to C++
zxing_cpp.rb bindings for Ruby (not just JRuby), powered by zxing-cpp
jsqrcode port to JavaScript
python-zxing bindings for Python
ZXing .NET port to .NET and C#, and related Windows platform
php-qrcode-detector-decoder port to PHP
ZXing Delphi Port to native Delphi object pascal, targeted at Firemonkey compatible devices (IOS/Android/Win/OSX) and VCL.
ZXingObjC Port to Objective-C
php-zxing PHP wrapper to Zxing Java library
zxing-js/library TypeScript port of ZXing library
pyzxing Python wrapper to ZXing library
Module Description
Barcode4J Generator library in Java
ZBar Reader library in C99
OkapiBarcode

Contacting

Post to the discussion forum or tag a question with zxing on StackOverflow.

Etcetera

Build Status Coverity Status codecov.io Codacy Badge

QR code is trademarked by Denso Wave, inc. Thanks to Haase & Martin OHG for contributing the logo.

Optimized with JProfiler