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_BIT_STREAM_H_ | 7 #ifndef _JBIG2_BIT_STREAM_H_ |
8 #define _JBIG2_BIT_STREAM_H_ | 8 #define _JBIG2_BIT_STREAM_H_ |
| 9 |
9 #include "JBig2_Define.h" | 10 #include "JBig2_Define.h" |
10 class CJBig2_BitStream : public CJBig2_Object { | 11 |
| 12 class CJBig2_BitStream { |
11 public: | 13 public: |
12 CJBig2_BitStream(uint8_t* pBuffer, FX_DWORD dwLength); | 14 CJBig2_BitStream(uint8_t* pBuffer, FX_DWORD dwLength); |
13 | 15 |
14 CJBig2_BitStream(CJBig2_BitStream& bs); | 16 CJBig2_BitStream(CJBig2_BitStream& bs); |
15 | 17 |
16 ~CJBig2_BitStream(); | 18 ~CJBig2_BitStream(); |
17 | 19 |
18 int32_t readNBits(FX_DWORD nBits, FX_DWORD* dwResult); | 20 int32_t readNBits(FX_DWORD nBits, FX_DWORD* dwResult); |
19 | 21 |
20 int32_t readNBits(FX_DWORD nBits, int32_t* nResult); | 22 int32_t readNBits(FX_DWORD nBits, int32_t* nResult); |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 inline uint8_t* CJBig2_BitStream::getPointer() { | 280 inline uint8_t* CJBig2_BitStream::getPointer() { |
279 return m_pBuf + m_dwByteIdx; | 281 return m_pBuf + m_dwByteIdx; |
280 } | 282 } |
281 inline void CJBig2_BitStream::offset(FX_DWORD dwOffset) { | 283 inline void CJBig2_BitStream::offset(FX_DWORD dwOffset) { |
282 m_dwByteIdx += dwOffset; | 284 m_dwByteIdx += dwOffset; |
283 } | 285 } |
284 inline FX_DWORD CJBig2_BitStream::getByteLeft() { | 286 inline FX_DWORD CJBig2_BitStream::getByteLeft() { |
285 return m_dwLength - m_dwByteIdx; | 287 return m_dwLength - m_dwByteIdx; |
286 } | 288 } |
287 #endif | 289 #endif |
OLD | NEW |