| 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 #include "core/include/fpdfapi/fpdf_parser_decode.h" |
| 8 |
| 7 #include <limits.h> | 9 #include <limits.h> |
| 8 | |
| 9 #include <vector> | 10 #include <vector> |
| 10 | 11 |
| 11 #include "core/include/fpdfapi/fpdf_module.h" | 12 #include "core/include/fpdfapi/fpdf_module.h" |
| 12 #include "core/include/fpdfapi/fpdf_parser.h" | 13 #include "core/include/fpdfapi/fpdf_objects.h" |
| 13 #include "core/include/fxcodec/fx_codec.h" | 14 #include "core/include/fxcodec/fx_codec.h" |
| 14 #include "core/include/fxcrt/fx_ext.h" | 15 #include "core/include/fxcrt/fx_ext.h" |
| 15 #include "core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.h" | 16 #include "core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.h" |
| 16 #include "third_party/base/stl_util.h" | 17 #include "third_party/base/stl_util.h" |
| 17 | 18 |
| 18 #define _STREAM_MAX_SIZE_ 20 * 1024 * 1024 | 19 #define _STREAM_MAX_SIZE_ 20 * 1024 * 1024 |
| 19 | 20 |
| 20 const FX_WORD PDFDocEncoding[256] = { | 21 const FX_WORD PDFDocEncoding[256] = { |
| 21 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, | 22 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, |
| 22 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, 0x0010, 0x0011, | 23 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, 0x0010, 0x0011, |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 FX_DWORD src_size, | 582 FX_DWORD src_size, |
| 582 uint8_t*& dest_buf, | 583 uint8_t*& dest_buf, |
| 583 FX_DWORD& dest_size) { | 584 FX_DWORD& dest_size) { |
| 584 CCodec_ModuleMgr* pEncoders = CPDF_ModuleMgr::Get()->GetCodecModule(); | 585 CCodec_ModuleMgr* pEncoders = CPDF_ModuleMgr::Get()->GetCodecModule(); |
| 585 if (pEncoders) { | 586 if (pEncoders) { |
| 586 return pEncoders->GetFlateModule()->FlateOrLZWDecode( | 587 return pEncoders->GetFlateModule()->FlateOrLZWDecode( |
| 587 FALSE, src_buf, src_size, FALSE, 0, 0, 0, 0, 0, dest_buf, dest_size); | 588 FALSE, src_buf, src_size, FALSE, 0, 0, 0, 0, 0, dest_buf, dest_size); |
| 588 } | 589 } |
| 589 return 0; | 590 return 0; |
| 590 } | 591 } |
| OLD | NEW |