Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Side by Side Diff: core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp

Issue 1773103003: Split off CPDF_Parser and CPDF_SimpleParser into .h/.cpp files (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "core/include/fpdfapi/fpdf_module.h" 9 #include "core/include/fpdfapi/fpdf_module.h"
10 #include "core/include/fpdfapi/fpdf_parser.h" 10 #include "core/include/fpdfapi/fpdf_parser.h"
11 #include "core/include/fxcodec/fx_codec.h" 11 #include "core/include/fxcodec/fx_codec.h"
12 #include "core/include/fxcrt/fx_ext.h" 12 #include "core/include/fxcrt/fx_ext.h"
13 #include "core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.h"
13 #include "third_party/base/stl_util.h" 14 #include "third_party/base/stl_util.h"
14 15
15 #define _STREAM_MAX_SIZE_ 20 * 1024 * 1024 16 #define _STREAM_MAX_SIZE_ 20 * 1024 * 1024
16 17
17 const FX_WORD PDFDocEncoding[256] = { 18 const FX_WORD PDFDocEncoding[256] = {
18 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 19 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008,
19 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, 0x0010, 0x0011, 20 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, 0x0010, 0x0011,
20 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x02d8, 0x02c7, 0x02c6, 21 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x02d8, 0x02c7, 0x02c6,
21 0x02d9, 0x02dd, 0x02db, 0x02da, 0x02dc, 0x0020, 0x0021, 0x0022, 0x0023, 22 0x02d9, 0x02dd, 0x02db, 0x02da, 0x02dc, 0x0020, 0x0021, 0x0022, 0x0023,
22 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 23 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002a, 0x002b, 0x002c,
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 FX_DWORD src_size, 579 FX_DWORD src_size,
579 uint8_t*& dest_buf, 580 uint8_t*& dest_buf,
580 FX_DWORD& dest_size) { 581 FX_DWORD& dest_size) {
581 CCodec_ModuleMgr* pEncoders = CPDF_ModuleMgr::Get()->GetCodecModule(); 582 CCodec_ModuleMgr* pEncoders = CPDF_ModuleMgr::Get()->GetCodecModule();
582 if (pEncoders) { 583 if (pEncoders) {
583 return pEncoders->GetFlateModule()->FlateOrLZWDecode( 584 return pEncoders->GetFlateModule()->FlateOrLZWDecode(
584 FALSE, src_buf, src_size, FALSE, 0, 0, 0, 0, 0, dest_buf, dest_size); 585 FALSE, src_buf, src_size, FALSE, 0, 0, 0, 0, 0, dest_buf, dest_size);
585 } 586 }
586 return 0; 587 return 0;
587 } 588 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698