| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef _JBIG2_HUFFMAN_TABLE_H_ | 7 #ifndef _JBIG2_HUFFMAN_TABLE_H_ |
| 8 #define _JBIG2_HUFFMAN_TABLE_H_ | 8 #define _JBIG2_HUFFMAN_TABLE_H_ |
| 9 #include "JBig2_Module.h" | 9 |
| 10 #include "JBig2_HuffmanTable_Standard.h" | 10 #include "JBig2_HuffmanTable_Standard.h" |
| 11 #include "JBig2_BitStream.h" | 11 #include "JBig2_BitStream.h" |
| 12 |
| 12 class CJBig2_HuffmanTable { | 13 class CJBig2_HuffmanTable { |
| 13 public: | 14 public: |
| 14 CJBig2_HuffmanTable(const JBig2TableLine* pTable, int nLines, FX_BOOL bHTOOB); | 15 CJBig2_HuffmanTable(const JBig2TableLine* pTable, int nLines, FX_BOOL bHTOOB); |
| 15 | 16 |
| 16 CJBig2_HuffmanTable(CJBig2_BitStream* pStream); | 17 CJBig2_HuffmanTable(CJBig2_BitStream* pStream); |
| 17 | 18 |
| 18 ~CJBig2_HuffmanTable(); | 19 ~CJBig2_HuffmanTable(); |
| 19 | 20 |
| 20 int parseFromStandardTable(const JBig2TableLine* pTable, | 21 int parseFromStandardTable(const JBig2TableLine* pTable, |
| 21 int nLines, | 22 int nLines, |
| 22 FX_BOOL bHTOOB); | 23 FX_BOOL bHTOOB); |
| 23 | 24 |
| 24 int parseFromCodedBuffer(CJBig2_BitStream* pStream); | 25 int parseFromCodedBuffer(CJBig2_BitStream* pStream); |
| 25 | 26 |
| 26 FX_BOOL isOK() { return m_bOK; } | 27 FX_BOOL isOK() { return m_bOK; } |
| 27 | 28 |
| 28 private: | 29 private: |
| 29 void init(); | 30 void init(); |
| 30 | 31 |
| 31 FX_BOOL HTOOB; | 32 FX_BOOL HTOOB; |
| 32 int NTEMP; | 33 int NTEMP; |
| 33 int* CODES; | 34 int* CODES; |
| 34 int* PREFLEN; | 35 int* PREFLEN; |
| 35 int* RANGELEN; | 36 int* RANGELEN; |
| 36 int* RANGELOW; | 37 int* RANGELOW; |
| 37 FX_BOOL m_bOK; | 38 FX_BOOL m_bOK; |
| 38 friend class CJBig2_HuffmanDecoder; | 39 friend class CJBig2_HuffmanDecoder; |
| 39 }; | 40 }; |
| 40 #endif | 41 #endif |
| OLD | NEW |