From 314743a4a752716b8e977482ad6c757c70d019db Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 18 Mar 2016 09:32:06 -0700 Subject: 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 . --- xfa/fxbarcode/pdf417/BC_PDF417CodewordDecoder.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'xfa/fxbarcode/pdf417/BC_PDF417CodewordDecoder.cpp') diff --git a/xfa/fxbarcode/pdf417/BC_PDF417CodewordDecoder.cpp b/xfa/fxbarcode/pdf417/BC_PDF417CodewordDecoder.cpp index dfbbc70264..53eabefd95 100644 --- a/xfa/fxbarcode/pdf417/BC_PDF417CodewordDecoder.cpp +++ b/xfa/fxbarcode/pdf417/BC_PDF417CodewordDecoder.cpp @@ -27,7 +27,11 @@ #define SYMBOL_TABLE_Length 2787 -FX_FLOAT CBC_PDF417CodewordDecoder::RATIOS_TABLE[2787][8] = {{0}}; +namespace { + +FX_FLOAT RATIOS_TABLE[SYMBOL_TABLE_Length][8] = {{0}}; + +} // namespace CBC_PDF417CodewordDecoder::CBC_PDF417CodewordDecoder() {} CBC_PDF417CodewordDecoder::~CBC_PDF417CodewordDecoder() {} -- cgit v1.2.3