summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/pdf417/BC_PDF417Common.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-03-18 09:32:06 -0700
committerTom Sepez <tsepez@chromium.org>2016-03-18 09:32:06 -0700
commit314743a4a752716b8e977482ad6c757c70d019db (patch)
tree3bb2332e5232c1b37e9da0ccb02aec2e87de1a00 /xfa/fxbarcode/pdf417/BC_PDF417Common.h
parent3420909bbb47d6e47d6c561cbcce06d056fdf0a3 (diff)
downloadpdfium-314743a4a752716b8e977482ad6c757c70d019db.tar.xz
Reduce size of several PDFium constant tables.
Either by using the smallest possible data type, or By accurately calcuating the bounds, or Moving to array of pointers for varying length rows. Notes: The 929 is reassuring since PDF417 barcode uses GF(929). FX_WCHAR is 4 bytes on unix (2 on windows). Binary looks to be about 240k smaller on linux/64 R=ochang@chromium.org Review URL: https://codereview.chromium.org/1807373002 .
Diffstat (limited to 'xfa/fxbarcode/pdf417/BC_PDF417Common.h')
-rw-r--r--xfa/fxbarcode/pdf417/BC_PDF417Common.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417Common.h b/xfa/fxbarcode/pdf417/BC_PDF417Common.h
index 61e93ab759..7e272b8a36 100644
--- a/xfa/fxbarcode/pdf417/BC_PDF417Common.h
+++ b/xfa/fxbarcode/pdf417/BC_PDF417Common.h
@@ -15,16 +15,16 @@ class CBC_PDF417Common {
virtual ~CBC_PDF417Common();
static int32_t getBitCountSum(CFX_Int32Array& moduleBitCount);
static int32_t getCodeword(FX_DWORD symbol);
- static int32_t NUMBER_OF_CODEWORDS;
- static int32_t MAX_CODEWORDS_IN_BARCODE;
- static int32_t MIN_ROWS_IN_BARCODE;
- static int32_t MAX_ROWS_IN_BARCODE;
- static int32_t MAX_CODEWORDS_IN_ROW;
- static int32_t MODULES_IN_CODEWORD;
- static int32_t MODULES_IN_STOP_PATTERN;
- static int32_t BARS_IN_MODULE;
- static int32_t SYMBOL_TABLE[];
- static int32_t CODEWORD_TABLE[];
+ static const int32_t NUMBER_OF_CODEWORDS = 929;
+ static const int32_t MAX_CODEWORDS_IN_BARCODE = NUMBER_OF_CODEWORDS - 1;
+ static const int32_t MIN_ROWS_IN_BARCODE = 3;
+ static const int32_t MAX_ROWS_IN_BARCODE = 90;
+ static const int32_t MAX_CODEWORDS_IN_ROW = 32;
+ static const int32_t MODULES_IN_CODEWORD = 17;
+ static const int32_t MODULES_IN_STOP_PATTERN = 18;
+ static const int32_t BARS_IN_MODULE = 8;
+ static const int32_t SYMBOL_TABLE[];
+ static const uint16_t CODEWORD_TABLE[];
private:
static CFX_Int32Array* EMPTY_INT_ARRAY;