DoxigAlpha

Function parameters

Parameters

#
encoder:*const Base64Encoder
dest:anytype
source:[]const u8

Base64 codecs

Types

#
Codecs
Base64 codecs

Error sets in this namespace

Error Sets

#

The Base64 alphabet defined in

Values

#
standard_alphabet_chars
The Base64 alphabet defined in
standard
Standard Base64 codecs, with padding, as defined in
standard_no_pad
Standard Base64 codecs, without padding, as defined in
url_safe_alphabet_chars
The URL-safe Base64 alphabet defined in
url_safe
URL-safe Base64 codecs, with padding, as defined in
url_safe_no_pad
URL-safe Base64 codecs, without padding, as defined in

Source

Implementation

#
pub fn encodeWriter(encoder: *const Base64Encoder, dest: anytype, source: []const u8) !void {
    var chunker = window(u8, source, 3, 3);
    while (chunker.next()) |chunk| {
        var temp: [5]u8 = undefined;
        const s = encoder.encode(&temp, chunk);
        try dest.writeAll(s);
    }
}