Topic Path: Symbol Reference > Classes > TIdDecoder Class > TIdDecoder Methods > Decode Method
TIdDecoder.Decode Method

Specifies the method used for decoding values in a buffer.

procedure Decode(
    const AIn: string; 
    const AStartPos: Integer = 1; 
    const ABytes: Integer = -1
); virtual; abstract;
Values to be decoded.
Initial position to be decoded. Default is 1.
Number of bytes toi be decoded. Default is -1. 

Decode is an abstract virtual procedure that specifies the method used to convert the encoded value in AIn to its un-encoded form. 

AStartPos indicates the initial value in AIn to begin the decoding operation. AStartPos values begin with 1. The default value is 1. 

ABytes indicates the number of byte values in AIn to be decoded. The default value is -1, and indicates that all values in AIn are affected by the operation. 

Decode must be overridden and implemented in a descendant class to reverse the specific encoding algorithm for the value in AIn. 

Use the DecodeString method to decode values passed in a string data type.

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