| ... | ... | @@ -7,6 +7,7 @@ pub fn encode(dest: []u8, source: []const u8) -> []u8 { |
| 7 | 7 | return encodeWithAlphabet(dest, source, standard_alphabet); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | /// invalid characters in source are allowed, but they cause the value of dest to be undefined. |
| 10 | 11 | pub fn decode(dest: []u8, source: []const u8) -> []u8 { |
| 11 | 12 | return decodeWithAlphabet(dest, source, standard_alphabet); |
| 12 | 13 | } |
| ... | ... | @@ -59,6 +60,7 @@ pub fn encodeWithAlphabet(dest: []u8, source: []const u8, alphabet: []const u8) |
| 59 | 60 | return dest[0..out_index]; |
| 60 | 61 | } |
| 61 | 62 | |
| 63 | /// invalid characters in source are allowed, but they cause the value of dest to be undefined. |
| 62 | 64 | pub fn decodeWithAlphabet(dest: []u8, source: []const u8, alphabet: []const u8) -> []u8 { |
| 63 | 65 | assert(alphabet.len == 65); |
| 64 | 66 | |