[FIX] bugfix: ensure that ptr is NULL
[FEATURE] optimize base64 String parsing