decode_step


Description:

public size_t decode_step (char[] _in, uchar* _out, ref int state, ref uint save)

Incrementally decode a sequence of binary data from its Base-64 stringified representation.

By calling this function multiple times you can convert data in chunks to avoid having to have the full encoded data in memory.

The output buffer must be large enough to fit all the data that will be written to it. Since base64 encodes 3 bytes in 4 chars you need at least: (len / 4) * 3 + 3 bytes (+ 3 may be needed in case of non-zero state).

Parameters:

state

Saved state between steps, initialize to 0

save

Saved state between steps, initialize to 0

in

binary input data

len

max length of in data to decode

out

output buffer

Returns:

The number of bytes of output that was written


Namespace: GLib.Base64
Package: glib-2.0