/// This class contains the methods for decoding the PDF417 codewords.
///
/// SITA Lab (kevin.osullivan@sita.aero)
///
internal static class DecodedBitStreamParser
{
private enum Mode
{
ALPHA,
LOWER,
MIXED,
PUNCT,
ALPHA_SHIFT,
PUNCT_SHIFT
}
private const int TEXT_COMPACTION_MODE_LATCH = 900;
private const int BYTE_COMPACTION_MODE_LATCH = 901;
private const int NUMERIC_COMPACTION_MODE_LATCH = 902;
private const int BYTE_COMPACTION_MODE_LATCH_6 = 924;
private const int BEGIN_MACRO_PDF417_CONTROL_BLOCK = 928;
private const int BEGIN_MACRO_PDF417_OPTIONAL_FIELD = 923;
private const int MACRO_PDF417_TERMINATOR = 922;
private const int MODE_SHIFT_TO_BYTE_COMPACTION_MODE = 913;
private const int MAX_NUMERIC_CODEWORDS = 15;
private const int PL = 25;
private const int LL = 27;
private const int AS = 27;
private const int ML = 28;
private const int AL = 28;
private const int PS = 29;
private const int PAL = 29;
private static readonly char[] PUNCT_CHARS = {
';', '<', '>', '@', '[', '\\', '}', '_', '`', '~', '!',
'\r', '\t', ',', ':', '\n', '-', '.', '$', '/', '"', '|', '*',
'(', ')', '?', '{', '}', '\''
};
private static readonly char[] MIXED_CHARS = {
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '&',
'\r', '\t', ',', ':', '#', '-', '.', '$', '/', '+', '%', '*',
'=', '^'
};
#if SILVERLIGHT4 || SILVERLIGHT5 || NET40 || NET45 || NETFX_CORE
///