Java Code Examples for com.google.zxing.common.reedsolomon.GenericGF#QR_CODE_FIELD_256

The following examples show how to use com.google.zxing.common.reedsolomon.GenericGF#QR_CODE_FIELD_256 . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Bits.java    From qart4j with GNU General Public License v3.0 5 votes vote down vote up
public void addCheckBytes(Version version, Level level) throws QArtException {
    int numberOfDataBytes = version.dataBytes(level);
    if (this.size < numberOfDataBytes*8) {
        pad(numberOfDataBytes*8 - this.size);
    }

    if (this.size != numberOfDataBytes*8) {
        throw new IllegalArgumentException("qr: too much data");
    }

    Version.VersionInfo versionInfo = Version.VERSION_INFOS[version.getVersion()];
    Version.VersionLevelInfo levelInfo = versionInfo.levelInfos[level.ordinal()];
    int numberOfDataBytesPerBlock = numberOfDataBytes / levelInfo.numberOfBlocks;
    int numberOfExtraBytes = numberOfDataBytes % levelInfo.numberOfBlocks;
    ReedSolomonEncoder reedSolomonEncoder = new ReedSolomonEncoder(GenericGF.QR_CODE_FIELD_256);

    int dataIndex = 0;
    for(int i = 0;i < levelInfo.numberOfBlocks;i++){
        if(i == levelInfo.numberOfBlocks - numberOfExtraBytes) {
            numberOfDataBytesPerBlock++;
        }

        byte[] checkBytes = ReedSolomonUtil.generateECBytes(reedSolomonEncoder, this.bits, dataIndex, numberOfDataBytesPerBlock, levelInfo.numberOfCheckBytesPerBlock);
        dataIndex += numberOfDataBytesPerBlock;

        this.append(new Bits(checkBytes, levelInfo.numberOfCheckBytesPerBlock * 8));
    }

    if(this.size/8 != versionInfo.bytes) {
        throw new QArtException("qr: internal error");
    }

}
 
Example 2
Source File: Decoder.java    From ScreenCapture with MIT License 4 votes vote down vote up
public Decoder() {
  rsDecoder = new ReedSolomonDecoder(GenericGF.QR_CODE_FIELD_256);
}
 
Example 3
Source File: Decoder.java    From Tesseract-OCR-Scanner with Apache License 2.0 4 votes vote down vote up
public Decoder() {
  rsDecoder = new ReedSolomonDecoder(GenericGF.QR_CODE_FIELD_256);
}
 
Example 4
Source File: Decoder.java    From QrCodeScanner with GNU General Public License v3.0 4 votes vote down vote up
public Decoder() {
  rsDecoder = new ReedSolomonDecoder(GenericGF.QR_CODE_FIELD_256);
}
 
Example 5
Source File: Decoder.java    From ZXing-Orient with Apache License 2.0 4 votes vote down vote up
public Decoder() {
  rsDecoder = new ReedSolomonDecoder(GenericGF.QR_CODE_FIELD_256);
}
 
Example 6
Source File: Decoder.java    From analyzer-of-android-for-Apache-Weex with Apache License 2.0 4 votes vote down vote up
public Decoder() {
  rsDecoder = new ReedSolomonDecoder(GenericGF.QR_CODE_FIELD_256);
}
 
Example 7
Source File: Decoder.java    From weex with Apache License 2.0 4 votes vote down vote up
public Decoder() {
  rsDecoder = new ReedSolomonDecoder(GenericGF.QR_CODE_FIELD_256);
}
 
Example 8
Source File: EncoderDecoder.java    From pied-piper with MIT License 4 votes vote down vote up
public EncoderDecoder(){
	decoder = new ReedSolomonDecoder(GenericGF.QR_CODE_FIELD_256);
	encoder = new ReedSolomonEncoder(GenericGF.QR_CODE_FIELD_256);
}
 
Example 9
Source File: Decoder.java    From barcodescanner-lib-aar with MIT License 4 votes vote down vote up
public Decoder() {
  rsDecoder = new ReedSolomonDecoder(GenericGF.QR_CODE_FIELD_256);
}
 
Example 10
Source File: Decoder.java    From reacteu-app with MIT License 4 votes vote down vote up
public Decoder() {
  rsDecoder = new ReedSolomonDecoder(GenericGF.QR_CODE_FIELD_256);
}
 
Example 11
Source File: Decoder.java    From MiBandDecompiled with Apache License 2.0 4 votes vote down vote up
public Decoder()
{
    a = new ReedSolomonDecoder(GenericGF.QR_CODE_FIELD_256);
}
 
Example 12
Source File: Decoder.java    From RipplePower with Apache License 2.0 4 votes vote down vote up
public Decoder() {
	rsDecoder = new ReedSolomonDecoder(GenericGF.QR_CODE_FIELD_256);
}
 
Example 13
Source File: Decoder.java    From Telegram-FOSS with GNU General Public License v2.0 4 votes vote down vote up
public Decoder() {
  rsDecoder = new ReedSolomonDecoder(GenericGF.QR_CODE_FIELD_256);
}
 
Example 14
Source File: Decoder.java    From barterli_android with Apache License 2.0 4 votes vote down vote up
public Decoder() {
    rsDecoder = new ReedSolomonDecoder(GenericGF.QR_CODE_FIELD_256);
}
 
Example 15
Source File: Decoder.java    From android-quick-response-code with Apache License 2.0 4 votes vote down vote up
public Decoder() {
    rsDecoder = new ReedSolomonDecoder(GenericGF.QR_CODE_FIELD_256);
}
 
Example 16
Source File: Decoder.java    From Telegram with GNU General Public License v2.0 4 votes vote down vote up
public Decoder() {
  rsDecoder = new ReedSolomonDecoder(GenericGF.QR_CODE_FIELD_256);
}