mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 14:25:16 +00:00
Put base64 alphabet into a named constant
This commit is contained in:
parent
d770dae1b8
commit
af730c64bd
@ -49,17 +49,13 @@ pub const MAX_PATH_BYTES = switch (builtin.os.tag) {
|
||||
else => @compileError("Unsupported OS"),
|
||||
};
|
||||
|
||||
/// Base64, replacing the standard `+/` with `-_` so that it can be used in a file name on any filesystem.
|
||||
pub const base64_encoder = base64.Base64Encoder.init(
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",
|
||||
base64.standard_pad_char,
|
||||
);
|
||||
pub const base64_alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
|
||||
|
||||
/// 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,
|
||||
);
|
||||
/// Base64 encoder, replacing the standard `+/` with `-_` so that it can be used in a file name on any filesystem.
|
||||
pub const base64_encoder = base64.Base64Encoder.init(base64_alphabet, base64.standard_pad_char);
|
||||
|
||||
/// Base64 decoder, replacing the standard `+/` with `-_` so that it can be used in a file name on any filesystem.
|
||||
pub const base64_decoder = base64.Base64Decoder.init(base64_alphabet, 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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user