ec_converter_convert
Name
ec_converter_convert — Convert a chunk of data
Synopsis
#include "misc/converter.h"
| int **ec_converter_convert** (
| conv, | |
| | srcbuf, | |
| | srcbuflen, | |
| | destbuf, | |
| | destbuflen, | |
| | src_consumed, | |
| | dest_used)
; | |
ec_converter * <var class="pdparam">conv</var>
;
const char * <var class="pdparam">srcbuf</var>
;
size_t <var class="pdparam">srcbuflen</var>
;
char * <var class="pdparam">destbuf</var>
;
size_t <var class="pdparam">destbuflen</var>
;
size_t * <var class="pdparam">src_consumed</var>
;
size_t * <var class="pdparam">dest_used</var>
;
Description
Note
This reference page was automatically generated from functions found in the header files in the development branch. The function described here may not exist in generally available versions of Momentum, and may change in behavior when it is generally available. Consult your vendor for definitive advice on the use of this function.
Convert a chunk of data.
Pushes a chunk of data through a converter. The converter transforms the data and stores it into your destination buffer.
- conv
-
an existing converter
- srcbuf
-
the data buffer to convert
- srcbuflen
-
the size of the input data buffer in bytes
- destbuf
-
receives converted data
- destbuflen
-
the size of the destination buffer
- src_consumed
-
the number of bytes consumed from srcbuf
- dest_used
-
the number of bytes used in destbuf
If you have reached the end of your input stream, you should call this function one final time with a NULL srcbuf and 0 srcbuflen. The converter may emit an epilogue to terminate the decoded data, so you should anticipate that you will receive data in your destination buffer in this case.
Returns ECCONV_OK on success, or some other value on error.