Refactor executable library handbooks and improve document reading

This commit is contained in:
cflmy committed 2026-11-08 22:19:11 +08:00
1 parent 16c44588d5
commit c50c515c4a
191 files changed
+29572 -7816

No files matched your search

+2 -2
View File
@@ -125,7 +125,7 @@ fn from_hex(b: u8) -> Result<u8, String> {
}
}
fn encode_base64(input: &[u8]) -> String {
pub(super) fn encode_base64(input: &[u8]) -> String {
let mut out = String::with_capacity((input.len() + 2) / 3 * 4);
let mut i = 0;
while i + 3 <= input.len() {
@@ -153,7 +153,7 @@ fn encode_base64(input: &[u8]) -> String {
out
}
fn decode_base64(input: &str) -> Result<Vec<u8>, String> {
pub(super) fn decode_base64(input: &str) -> Result<Vec<u8>, String> {
let raw = input.as_bytes();
if raw.len() % 4 != 0 {
return Err("base64_decode: length must be multiple of 4".into());