Base 64 decoding a large mime message attachment

I did try that, faced the same issue. Is there any other of decoding which doesn’t involve conversion to string. I’m skeptical about this approach. I think there will be data loss.