Performance improvement and bug fix for Base64

Found a bug related to the handling of NaN.

Improved decompressed enormously by using StringBuilder instead of concat, which is too slow for large strings.