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