Internet Direct (Indy) Version 9.0.2 Beta
TIdEncoder3to4.EncodeUnit
Converts 3 byte input values to their Cardinal representation.

procedure EncodeUnit(const AIn1: Byte; const AIn2: Byte; const AIn3: Byte; var VOut: Cardinal);
Parameters
const AIn1: Byte
First input byte value.

const AIn2: Byte
Second input byte value.

const AIn3: Byte
Third input byte value.

var VOut: Cardinal
Cardinal representation of the encode value.

Description
EncodeUnit is Procedure that converts the 3 byte input values (AIn1, AIn2, AIn3) to their encoded Cardinal representation in VOut. EncodeUnit uses the Ordinal values from CodingTable to represent each consecutive 6-bit value in the 3-byte input parameters.

EncodeUnit is called repeatedly from Encode as inoput values are read from a stream.