Indy 9
|
TIdDecoderUUEBase = class(TIdDecoder4to3)
TIdDecoderUUEBase uses the 4-byte to 3-byte decoding algorithm defined in TIdDecoder4to3. TIdDecoderUUEBase handles the UUEncode body line format, which consists of the encoded length followed by the encoded data.
TIdDecoderUUEBase is used by other Indy coder classes, such as TIdMessageDecoderUUE, that handle UUEncode message streams in RFC 822-compliant mail messages.
procedure DecodeToStream(AIn: string; ADest: TStream); override;
AIn contains the UUEncoded input values that will be restored to their original binary format.
ADest is a TStream descendant that will receive the results of the decoding algorithm.
When the length of AIn is 0, DecodeToStream does not attempt to perform the decoding algorithm. DecodeToStream reads the first byte in AIn to determine the length of the UUencoded data using the ordinal position of the value in the UUEncode alphabet.
The remainder of AIn is the UUEncoded data that will be restored to its original binary representation. When the length of the remaining portion of AIn is not a multiple of 3, AIn is padded with FillChar to the desired length.
Finally, DecodeToStream calls the inherited DecodeToStream method to perform conversion of the UUEncoded data to its binary representation.