On Android, I'm using Base64.decode() method. It has several variants, but all of them decode the given base64 input into a newly created byte array.
Since I need to call this a lot with big inputs, it allocates a lot of memory and causes frequent GC.
So I'm wondering if there is a way to pass an existing byte array to the method, or alternative techniques, so that it puts the result inside the existing byte array and avoid allocating memory for a new one. That would be similar to the use of options.inBitmap in BitmapFactory when creating a bitmap in order to reuse an existing bitmap.
Thanks for your help