My question is very closely linked to this one but it has a slightly different tilt to it.
I have a program that reads files of varying size for various reasons. The source files could be 20Kb or 20Mb or 20Gb. A user has asked me to add Base64 support, such that my program analyses the DECODED version of the Base64 file, just like it would a normal file. But the user doesn't want to decode the files himself.
I use Lazarus and Freepascal. I am aware of the TBase64DecodingStream and TBase64EncodingStream and I also found this solution by Engkin in the forum. However, all the examples don't quite explain how to take a Base64 ENCODED file as a stream and generate a Base64 DEcoded version of it. They all seem to relate to encoding and decoding of strings, or creating Base64 ENcoded files. Not creating Base64 DEcoded files from Base64 ENcoded files, which is what I need.
I wonder if any of you could help me? David Heffernan clearly has a good understanding of all things Delphi and Pascal and indeed Base64, but I don't know if he will see this.
Other similar questions are this one but it relates to Javascript for the decoding aspect (though Delphi does feature in it) and also this Java related question