ParseInt replaced with ~~ to improve decoding speed and some other speed optimization.