JCL Help:MimeDecode@@SizeInt@
JCL Help: MimeDecode Function
Search in JCL Help
Search in all projects
Summary
The primary Mime decoding routine.
Pascal
function MimeDecode(const InputBuffer: TDynByteArray; InputOffset: SizeInt; const InputByteCount: SizeInt; out OutputBuffer: TDynByteArray; OutputOffset: SizeInt = 0): SizeInt; overload;
function MimeDecode(const InputBuffer: TDynByteArray; const InputByteCount: SizeInt; out OutputBuffer: TDynByteArray): SizeInt; overload;
function MimeDecode(const InputBuffer; const InputByteCount: SizeInt; out OutputBuffer): SizeInt; overload;
Parameters
Parameters | Description |
const InputBuffer: TDynByteArray | Points to the memory block to encode. |
out OutputBuffer: TDynByteArray | Points to the output buffer. |
InputBytesCount | Number of bytes to encode. |
Return Value
Number of bytes actually written to the OutputBuffer.
Description
MimeDecode is the primary MIME-decoding routine and can also be used directly. CAUTION: OutputBuffer must have enough memory allocated to take all output. MimeDecodedSize(InputBytesCount) calculates this amount in bytes. There is no guarantee that all output will be filled after decoding. MimeDecode therefore returns the actual number of bytes written to OutputBuffer. Preallocating all memory at once (as is required by MimeDecode) avoids the time-consuming process of reallocation. After calling MimeDecode, simply cut the allocated memory down to OutputBytesCount, i.e. SetLength(OutString, OutputBytesCount).
See Also
About
Unit
Donator
Ralf Junker
Contribute to this help topic
This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page