| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
| 6 | |
| 7 #ifndef _BC_DATAMATRIXDECODEDBITSTREAMPARSER_H_ | |
| 8 #define _BC_DATAMATRIXDECODEDBITSTREAMPARSER_H_ | |
| 9 class CBC_CommonDecoderResult; | |
| 10 class CBC_CommonBitSource; | |
| 11 class CBC_DataMatrixDecodedBitStreamParser; | |
| 12 class CBC_DataMatrixDecodedBitStreamParser : public CFX_Object | |
| 13 { | |
| 14 public: | |
| 15 CBC_DataMatrixDecodedBitStreamParser(); | |
| 16 virtual ~CBC_DataMatrixDecodedBitStreamParser(); | |
| 17 static CBC_CommonDecoderResult *Decode(CFX_ByteArray &bytes, FX_INT32 &e); | |
| 18 | |
| 19 private: | |
| 20 static FX_INT32 DecodeAsciiSegment(CBC_CommonBitSource *bits, CFX_ByteString
&result, CFX_ByteString &resultTrailer, FX_INT32 &e); | |
| 21 static void DecodeC40Segment(CBC_CommonBitSource *bits, CFX_ByteString &resu
lt, FX_INT32 &e); | |
| 22 static void DecodeTextSegment(CBC_CommonBitSource *bits, CFX_ByteString &res
ult, FX_INT32 &e); | |
| 23 static void DecodeAnsiX12Segment(CBC_CommonBitSource *bits, CFX_ByteString &
result, FX_INT32 &e); | |
| 24 static void ParseTwoBytes(FX_INT32 firstByte, FX_INT32 secondByte, CFX_Int32
Array &result); | |
| 25 static void DecodeEdifactSegment(CBC_CommonBitSource *bits, CFX_ByteString &
result, FX_INT32 &e); | |
| 26 static void DecodeBase256Segment(CBC_CommonBitSource *bits, CFX_ByteString &
result, CFX_Int32Array &byteSegments, FX_INT32 &e); | |
| 27 static FX_BYTE Unrandomize255State(FX_INT32 randomizedBase256Codeword, FX_IN
T32 base256CodewordPosition); | |
| 28 | |
| 29 const static FX_CHAR C40_BASIC_SET_CHARS[]; | |
| 30 const static FX_CHAR C40_SHIFT2_SET_CHARS[]; | |
| 31 | |
| 32 | |
| 33 const static FX_CHAR TEXT_BASIC_SET_CHARS[]; | |
| 34 const static FX_CHAR TEXT_SHIFT3_SET_CHARS[]; | |
| 35 const static FX_INT32 PAD_ENCODE; | |
| 36 const static FX_INT32 ASCII_ENCODE; | |
| 37 const static FX_INT32 C40_ENCODE; | |
| 38 const static FX_INT32 TEXT_ENCODE; | |
| 39 const static FX_INT32 ANSIX12_ENCODE; | |
| 40 const static FX_INT32 EDIFACT_ENCODE; | |
| 41 const static FX_INT32 BASE256_ENCODE; | |
| 42 }; | |
| 43 #endif | |
| OLD | NEW |