get base64-encoding working as a stream