Topic Path: Pending > TIdMessageEncoderUUEBase.Encode@TIdStreamRandomAccess@TIdStream

Implement encoding of a message part using a 3-byte to 4-byte encoding algorithm.

Stream containing the message part to be encoded.
Stream to receive the encoded message part. 

Encode is an overridden procedure in TIdMessageEncoderUUEBase that extends the ancestor class by implementing encoding of an RFC 822 message part using a 3-byte to 4-byte encoding algorithm. 

Encode uses an instance of the TIdEncoder3to4 object to perform encoding of the values in the ASrc input stream, and writes the encoded message part to the ADest output stream. 

Encode constructs the entire UUEncode packet including the header, body, and trailer sections. The header section includes the keyword "begin" followed by the space-delimited values for PermissionCode, Filename, and the EOL character sequence. The body section consists of one or more lines containing the encoded output form the TIdEncoder3to4 object. Each line will contain not more than 45 bytes and the EOL character sequence. The trailer section contains the FillChar value followed by EOL, the keyword "end", and an additional EOL character sequence.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.