diff options
author | Tom Sepez <tsepez@chromium.org> | 2016-03-18 09:32:06 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2016-03-18 09:32:06 -0700 |
commit | 314743a4a752716b8e977482ad6c757c70d019db (patch) | |
tree | 3bb2332e5232c1b37e9da0ccb02aec2e87de1a00 /xfa/fxbarcode/pdf417/BC_PDF417.cpp | |
parent | 3420909bbb47d6e47d6c561cbcce06d056fdf0a3 (diff) | |
download | pdfium-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_PDF417.cpp')
-rw-r--r-- | xfa/fxbarcode/pdf417/BC_PDF417.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417.cpp b/xfa/fxbarcode/pdf417/BC_PDF417.cpp index e57a79e17e..15b448b37b 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417.cpp +++ b/xfa/fxbarcode/pdf417/BC_PDF417.cpp @@ -28,9 +28,7 @@ #include "xfa/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.h" #include "xfa/fxbarcode/utils.h" -int32_t CBC_PDF417::START_PATTERN = 0x1fea8; -int32_t CBC_PDF417::STOP_PATTERN = 0x3fa29; -int32_t CBC_PDF417::CODEWORD_TABLE[][1000] = { +const int32_t CBC_PDF417::CODEWORD_TABLE[][929] = { {0x1d5c0, 0x1eaf0, 0x1f57c, 0x1d4e0, 0x1ea78, 0x1f53e, 0x1a8c0, 0x1d470, 0x1a860, 0x15040, 0x1a830, 0x15020, 0x1adc0, 0x1d6f0, 0x1eb7c, 0x1ace0, 0x1d678, 0x1eb3e, 0x158c0, 0x1ac70, 0x15860, 0x15dc0, 0x1aef0, 0x1d77c, |