@@ -15,34 +15,16 @@ const VLQ_CONTINUATION_BIT: u64 = VLQ_BASE; // 0b100000
1515pub const MAX_VLQ_BYTES : usize = 13 ;
1616
1717/// Pre-computed base64 encode lookup table (index -> char byte).
18- #[ rustfmt:: skip]
19- const BASE64_ENCODE : [ u8 ; 64 ] = [
20- b'A' , b'B' , b'C' , b'D' , b'E' , b'F' , b'G' , b'H' ,
21- b'I' , b'J' , b'K' , b'L' , b'M' , b'N' , b'O' , b'P' ,
22- b'Q' , b'R' , b'S' , b'T' , b'U' , b'V' , b'W' , b'X' ,
23- b'Y' , b'Z' , b'a' , b'b' , b'c' , b'd' , b'e' , b'f' ,
24- b'g' , b'h' , b'i' , b'j' , b'k' , b'l' , b'm' , b'n' ,
25- b'o' , b'p' , b'q' , b'r' , b's' , b't' , b'u' , b'v' ,
26- b'w' , b'x' , b'y' , b'z' , b'0' , b'1' , b'2' , b'3' ,
27- b'4' , b'5' , b'6' , b'7' , b'8' , b'9' , b'+' , b'/' ,
28- ] ;
18+ const BASE64_ENCODE : [ u8 ; 64 ] =
19+ * b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" ;
2920
3021/// Cache-line-aligned base64 encode table for encoding hot paths.
3122/// 64 bytes fits exactly in one cache line, avoiding split-load penalties.
3223#[ repr( align( 64 ) ) ]
3324struct AlignedBase64Table ( [ u8 ; 64 ] ) ;
3425
35- #[ rustfmt:: skip]
36- static BASE64_TABLE : AlignedBase64Table = AlignedBase64Table ( [
37- b'A' , b'B' , b'C' , b'D' , b'E' , b'F' , b'G' , b'H' ,
38- b'I' , b'J' , b'K' , b'L' , b'M' , b'N' , b'O' , b'P' ,
39- b'Q' , b'R' , b'S' , b'T' , b'U' , b'V' , b'W' , b'X' ,
40- b'Y' , b'Z' , b'a' , b'b' , b'c' , b'd' , b'e' , b'f' ,
41- b'g' , b'h' , b'i' , b'j' , b'k' , b'l' , b'm' , b'n' ,
42- b'o' , b'p' , b'q' , b'r' , b's' , b't' , b'u' , b'v' ,
43- b'w' , b'x' , b'y' , b'z' , b'0' , b'1' , b'2' , b'3' ,
44- b'4' , b'5' , b'6' , b'7' , b'8' , b'9' , b'+' , b'/' ,
45- ] ) ;
26+ static BASE64_TABLE : AlignedBase64Table =
27+ AlignedBase64Table ( * b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" ) ;
4628
4729/// Pre-computed base64 decode lookup table (char byte -> value).
4830/// Invalid characters map to 255.
0 commit comments