A general purpose Base64 decoding routine using Indy

This little routine is for use with Indy Component (v10) to decode some base-64 encoded information.Choose TBytes return type because base-64 encoding can be used for any sequence of “octets”. You better to not return a string since that implies text was encoded. We can easily return a string from the byte array.
As well as TBytes we use the relatively new TBytesStream stream class, so you will need to make some changes if using old Delphi versions.