Add filesystem base64 decoder

master
LeRoyce Pearson 2020-03-06 20:17:23 -07:00 committed by Andrew Kelley
parent ce5b2286f1
commit 8c8813a5cf
1 changed files with 6 additions and 0 deletions

View File

@ -55,6 +55,12 @@ pub const base64_encoder = base64.Base64Encoder.init(
base64.standard_pad_char,
);
/// Base64, replacing the standard `+/` with `-_` so that it can be used in a file name on any filesystem.
pub const base64_decoder = base64.Base64Decoder.init(
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",
base64.standard_pad_char,
);
/// Whether or not async file system syscalls need a dedicated thread because the operating
/// system does not support non-blocking I/O on the file system.
pub const need_async_thread = std.io.is_async and switch (builtin.os.tag) {