com.google.zxing.pdf417.decoder.DecodedBitStreamParser.decodeBase900toBase10(int[], int)

Here are the examples of the csharp api class com.google.zxing.pdf417.decoder.DecodedBitStreamParser.decodeBase900toBase10(int[], int) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Example 7

1. Example

View license
private static int numericCompaction(int[] codewords, int codeIndex, System.Text.StringBuilder result)
		{
			int count = 0;
			bool end = false;
			
			int[] numericCodewords = new int[MAX_NUMERIC_CODEWORDS];
			
			while ((codeIndex < codewords.Length) && !end)
			{
				int code = codewords[codeIndex++];
				if (code < TEXT_COMPACTION_MODE_LATCH)
				{
					numericCodewords[count] = code;
					count++;
				}
				else
				{
					if ((code == TEXT_COMPACTION_MODE_LATCH) || (code == BYTE_COMPACTION_MODE_LATCH) || (code == BYTE_COMPACTION_MODE_LATCH_6) || (code == BEGIN_MACRO_PDF417_CONTROL_BLOCK) || (code == BEGIN_MACRO_PDF417_OPTIONAL_FIELD) || (code == MACRO_PDF417_TERMINATOR))
					{
					}
					codeIndex--;
					end = true;
				}
				if ((count % MAX_NUMERIC_CODEWORDS) == 0 || code == NUMERIC_COMPACTION_MODE_LATCH)
				{
					// Re-invoking Numeric Compaction mode (by using codeword 902
					// while in Numeric Compaction mode) serves  to terminate the
					// current Numeric Compaction mode grouping as described in 5.4.4.2,
					// and then to start a new one grouping.
					System.String s = decodeBase900toBase10(numericCodewords, count);
					result.Append(s);
					count = 0;
				}
			}
			return codeIndex;
		}