File Encoding and Decoding


CLASS aprEncode

 

Description

The file encoding Class provides Methods for encoding and decoding binary files, typically attachments to e-mail messages. The process of encoding converts the contents of a binary file to printable 7-bit ASCII text. Decoding reverses the process, converting a previously encoded text file back into a binary file.

 

There are two primary types of encoding used, uucode and base64. The uucode format (so called because the programs to perform the conversion were called uuencode and uudecode) is commonly used on UNIX systems and is still widely used when attaching binary files to USENET newsgroup posts. The base64 algorithm is most commonly used with e-mail attachments, and is often referred to as MIME encoding since this is the encoding method specified in the MIME standards document.

 

 

Variables

 

:cErr

Holds a description for the Last error code

 

:DeBug

Enable/Disable extended Debug notifications.

 

:DebugTrace

Enable/Disable Callstack List to be included in Error Messages (:Debug)

 

:nErr

Holds the last error code

 

Methods

 

:New

Creates a new Instance of the aprEncode Class

 

:Destroy

Releases the system resources assigned by the :New() Method.

 

 

:CompressFile

Compress the contents of the specified file

 

:Decode

Decode a base64 encoded string, storing the result in a byte array

 

:DecodeFile

Decode the contents of a file using the specified decoding method

 

:Encode

Encode a byte array using the base64 encoding method

 

:EncodeFile

Encode the contents of a file using the specified encoding method

 

:ExpandFile

Expand the contents of a previously compressed file