Xceed Binary Encoding Library Documentation
Manager Sample Application for C++Builder
Sample Applications > Manager Sample Application for C++Builder

Introduction

This sample demonstrates how to encode and decode single files using different kinds of encoding methods.

Project file

Project path : Samples\C++Builder 4\Manager and Samples\C++Builder 5-6\Manager

Project file name : Manager.bpr

Demonstrates

Properties: EndOfLineType, MaxLineLength, ContinueOnInvalidData, HeaderDataForkLength, HeaderResourceForkLength, HeaderFilename, EncodingFormat and IncludeHeaderFooter from the various Encoding format objects.

Methods: ProcessFile

How to use

The form contains two tabs. One for encoding and one for decoding.

Encoding: Specify the source path and file name of the file to encode, the destination file name and the encoding method to use and click the Encode button. When you type the source file name, if the destination file name is empty, it will automatically be set to the same filename as the source, but with the appropriate filename extension depending on the selected encoding method.

Decoding: Select one or more encoded files. These files are added to the list box. Select a destination path and a file name to decode to. The sample will decode all these files into a single destination file. All source files must therefore be encoded using the same encoding method. If the destination file name is left empty, the sample will automatically select a file name when decoding the first file from the list. Click the Decode button to begin the process.

Various other options can be set from the main form. This includes the maximum line length, the end of line type and also the choice of wether or not the library should continue if it encounters invalid data when decoding.

All errors that occur when encoding or decoding are shown in a text box at the bottom of the main form.