More bit friendly decodeIAID and decodeInteger
Micro optimization of ArithmeticDecoder_readBit
Nest JBIG2 prediction if statements together

ltp can only become truthy if predition is true.
Optimized bounding box tests in JBIG2's decodeBitmap
Use changingTemplateX, Y and Shift in JBIG2's decodeBitmap
Process only once the offset and starting mask JBIG2's drawBitmap
Reuse the row Uint8Array in JBIG2's decodeBitmap
Optmized decodeRefinement, moving the prediction error outside the inner loop

There is no need to slow down the inner loop with a test for ltp as it can only
change if prediction is true in which case it only changes in the outer loop.