Topic Path: Symbol Reference > Classes > TIdDecoder4to3 Class > TIdDecoder4to3 Methods > Decode Method
ContentsIndexHome
PreviousUpNext
TIdDecoder4to3.Decode Method

Performs the specifics of the TIdDecoder4to3 decoding algorithm.

procedure Decode(
    const AIn: string; 
    const AStartPos: Integer = 1; 
    const ABytes: Integer = -1
); override;
Parameters 
Description 
AIn 
Values to be converted.
 
AStartPos 
Initial position to be decoded.
 
ABytes 
Number of bytes to be decoded. 

Decode is an overridden procedure that implements the specific processing required to perform the TIdDecoder4to3 decoding algorithm. 

AIn contains the value of the encoded data, and must contains a non-empty string value. Decode uses TIdBytes in its implementation to account for MBCS and Unicode values in AIn. 

Values in AIn are copied from AIn starting at the byte value indicated in AStartPos, and including the numner of byte values indicated in ABytes. When ABytes contains -1, all byte values in AIn are decoded. 

Decode reads 4 byte values from AIn, and converts the 6-bits of each byte into their un-encoded representation as 3 Bytes values in the internal stream for the decoder implementation. 

Decoded values might contain the character in FillChar value that indicates the decode values can be omitted from the output for the decoder.

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