mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-05-31 15:21:00 +02:00
*Note:* This is similar to PR 19525, which did the same thing for the OpenJPEG decoder. The advantages of doing this are: - The same JBig2 decoder is used regardless of WASM being supported or not, which means consistent rendering. - The old `Jbig2Image` implementation has various bugs and missing features. - Less code that needs to be maintained in the PDF.js project, since both the CCITT and the JBig2 decoder is replaced. The disadvantage of doing this is: - Slightly larger bundle size, however the effect is limited since a fair amount of PDF.js code can be removed. For the `gulp mozcentral` target the size increase is approximately 54 kilo-bytes (which is small compared to the 452 kilo-bytes for the JS version of the OpenJPEG decoder).