Declaration: DecodeASCII85 (InStream, OutStream: TStream): integer;
The function DecodeASCII85 decodes the base-85 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
-2 ... 'z' in middle of quintuple

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

Hint: For a detailed description of ASCII85 encoding, see EncodeASCII85.