The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



DecodeBase64


Unit: SDL_dstruct
Class: none
Declaration: function DecodeBase64 (InStream, OutStream: TStream): integer;

The function DecodeBase64 decodes the base-64 encoded data stream InStream and writes the result to the stream OutStream. Data of Instream is read from the current stream position; the resulting decoded data is written to the current position of Outstream (overwriting all data after the current position). The function returns the following error codes:
0 no error
-1 invalid character in the input stream

In addition to the original definition DecodeBase64 accepts CR (ASCII 13) and LF (ASCII 10) in the input stream. These characters are discarded during the decoding process.



Last Update: 2020-May-27