|
pure virtual |
This function converts a uuencoded string of characters back into its orginal form.
This decoding decreases the size of of the input by 1/3 (i.e., converts every group of 4 bytes into 3 bytes). The resulting value can be in text or a binary format. Note, that it is possible to decode in place, that is the parameters "pUuencode" and "pDecoded" can point to the SAME buffer.
The parameter pDecoded can be set to NULL. In this case, this function returns the buffer size required to perform the decode operation.
Note that this decoding function does not modify the line terimation convention of the original data. If the original data came from a Unix system with line feed as a line terminator then the decoded data will maintain that convention. The uuencode definition requires that an initial line starting with the text "begin" also contain the mode (or Unix privilege bits) and file name for the original data (e.g., begin 644 dog.gif).
pUuencode | [ in ] Pointer to a buffer containing uuencoded ASCII text |
mode | [ out ] The Unix file privilege bits associated with the originally unencoded data, from the "begin" line. |
pFileName | [ out ] The file name associated with the orginal unencoded data, from the begin line. |
nameSize | [ in ] The size in bytes of the buffer pointed to by pFileName [ out ] The size in bytes of the data copied into the buffer pointed to by pFileName |
pDecoded | [ out ] The data pointed to by pUuencode decoded into its orginal form. This pointer can be NULL. |
decodedSize | [ in ] The size (in bytes) of the buffer pointed to by pDecoded, [ out ] The number of decoded bytes of data in the buffer pointed to by pDecoded |
Success | P6R::eOk | |
Failure | P6R::eInvalidArg | pUuencode or pFileName is NULL. Or decodedSize or nameSize is zero. Or the buffer pointed to by pUuencode is empty. |
P6R::eTooSmall | The buffer pDecoded is too small to contain the generated value. | |
P6R::eNotInitialized | A successful call to initialize has not been done. | |
P6R::eFormatError | The data pointed to by pUuencode cannot be decoded. |