base64 stream encode