added decode, current size is 400+ bytes but b64_encode can be easily optimised for size without performance loss