mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2026-11-25 23:06:59 +00:00
perf: vectorize bounded Base64 encoding and decoding with scalar fallback
This commit is contained in:
1 parent
5681d3b805
commit
44b023d919
18 files changed
+291
-32
No files matched your search
@@ -118,9 +118,7 @@ public class CommonUtils {
|
||||
* <p>不再做 URLEncoder,避免前端/代理再 encode 时变成 %253D。</p>
|
||||
*/
|
||||
public static String urlBase64Encode(String str) {
|
||||
return java.util.Base64.getUrlEncoder()
|
||||
.withoutPadding()
|
||||
.encodeToString(str.getBytes(StandardCharsets.UTF_8));
|
||||
return Base64Encoder.encodeUrlWithoutPadding(str.getBytes(StandardCharsets.UTF_8));
|
||||
}
|
||||
|
||||
private static String padBase64(String s) {
|
||||
|
||||
Reference in new issue
Block a user