GLib.base64_decode_step
function base64_decode_step(in: ByteArray, state: Number(gint), save: Number(guint)): [return_value: Number(gsize), out: ByteArray, state: Number(gint), save: Number(guint)] { // Gjs wrapper for g_base64_decode_step() }
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).
Since 2.12
- in
binary input data
- state
Saved state between steps, initialize to 0
- save
Saved state between steps, initialize to 0
- return_value
The number of bytes of output that was written
- out
output buffer
- state (out)
Saved state between steps, initialize to 0
- save (out)
Saved state between steps, initialize to 0