1 // Copyright 2014 PDFium Authors. All rights reserved.
\r
2 // Use of this source code is governed by a BSD-style license that can be
\r
3 // found in the LICENSE file.
\r
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
\r
7 #ifndef _BC_DECODEDBITSTREAMPARSER_H_
\r
8 #define _BC_DECODEDBITSTREAMPARSER_H_
\r
9 class CBC_CommonDecoderResult;
\r
10 class CBC_PDF417ResultMetadata;
\r
11 class CBC_DecodedBitStreamPaser;
\r
12 class CBC_DecodedBitStreamPaser : public CFX_Object
\r
15 CBC_DecodedBitStreamPaser();
\r
16 virtual ~CBC_DecodedBitStreamPaser();
\r
17 static void Initialize();
\r
18 static void Finalize();
\r
19 static CBC_CommonDecoderResult* decode(CFX_Int32Array &codewords, CFX_ByteString ecLevel, FX_INT32 &e);
\r
30 static FX_INT32 MAX_NUMERIC_CODEWORDS;
\r
37 static FX_INT32 PAL;
\r
38 static FX_CHAR PUNCT_CHARS[29];
\r
39 static FX_CHAR MIXED_CHARS[30];
\r
40 static FX_INT32 EXP900[16];
\r
41 static FX_INT32 NUMBER_OF_SEQUENCE_CODEWORDS;
\r
42 static FX_INT32 decodeMacroBlock(CFX_Int32Array &codewords, FX_INT32 codeIndex, CBC_PDF417ResultMetadata* resultMetadata, FX_INT32 &e);
\r
43 static FX_INT32 textCompaction(CFX_Int32Array &codewords, FX_INT32 codeIndex, CFX_ByteString &result);
\r
44 static void decodeTextCompaction(CFX_Int32Array &textCompactionData, CFX_Int32Array &byteCompactionData, FX_INT32 length, CFX_ByteString &result);
\r
45 static FX_INT32 byteCompaction(FX_INT32 mode, CFX_Int32Array &codewords, FX_INT32 codeIndex, CFX_ByteString &result);
\r
46 static FX_INT32 numericCompaction(CFX_Int32Array &codewords, FX_INT32 codeIndex, CFX_ByteString &result, FX_INT32 &e);
\r
47 static CFX_ByteString decodeBase900toBase10(CFX_Int32Array &codewords, FX_INT32 count, FX_INT32 &e);
\r