The decode table to use. Variadic template parameter is used to allow passing it as an expression in D1, but a single ubyte[256] is expected.
what is to be decoded
a big enough array to hold the decoded data
ubyte[512] decodebuf; mstring myDecodedString = cast(mstring)decode("SGVsbG8sIGhvdyBhcmUgeW91IHRvZGF5Pw==", decodebuf); Stdout(myDecodedString).newline; // Hello, how are you today?
Decodes an ASCCI base64 string and returns it as ubyte[] data.
This decoder will ignore non-base64 characters, so for example data with newline in it is valid. Note that the entries in the provided decode table are not required to be unique. This allows the use of decode tables with alternatives for certain characters.
Since the padding is required only between multiple base64 strings (for the decoder not to interpret the start of the next string as the end of the previous one), data may or may not contain the trailing padding, and it will still be decoded correctly.