Encoding.base64EncodeStep

size_t base64EncodeStep(ubyte[] inbuf, ref ubyte[] outbuf, ref int state, ref uint save)

Base64 encodes a chunk of data. Performs an 'encode step', only encodes blocks of 3 characters to the output at a time, saves left-over state in state and save (initialise to 0 on first invocation).

Parameters

inbufinput buffer
outbufoutput buffer
stateholds the number of bits that are stored in save
saveleftover bits that have not yet been encoded

Returns

the number of bytes encoded.