This sample demonstrates how to encode and decode a block of memory data using different kinds of encoding methods.
Project path: Samples\C++Builder 4\MemoryEncode and Samples\C++Builder 5-6\MemoryEncode
Project file name: MemoryEncode.bpr
Properties: ContinueOnInvalidData, IncludeHeaderFooter, EndOfLineType, MaxLineLength, HeaderDataForkLength, HeaderResourceForkLength and EncodingFormat from the various Encoding format interfaces.
Select the encoding method and the end-of-line type using the two combo boxes. Next, set the maximum line length (meaningful only if the end-of-line type is not "None"). Type the text to encode in the "Decoded text" text box and click Encode to fill the "Encoded text" text box with the encoded results. You can click the Decode button to reverse the process (something has to be in the "Encoded text" box for this to work). The main form contains two labels that indicate the size of the decoded text and the size (in characters) of the encoded text.