An input range over the data to be encoded.
If range is a range of bytes, an Encoder that iterates over the bytes of the corresponding Base64 encoding.
If range is a range of ranges of bytes, an Encoder that iterates over the Base64 encoded strings of each element of the range.
In both cases, the returned Encoder will be a forward range if the given range is at least a forward range, otherwise it will be only an input range.
This example encodes the input one line at a time.
File f = File("text.txt", "r"); scope(exit) f.close(); uint line = 0; foreach (encoded; Base64.encoder(f.byLine())) { writeln(++line, ". ", encoded); }
This example encodes the input data one byte at a time.
ubyte[] data = cast(ubyte[]) "0123456789"; // The ElementType of data is not aggregation type foreach (encoded; Base64.encoder(data)) { writeln(encoded); }
Construct an Encoder that iterates over the Base64 encoding of the given input range.