File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 22## Fast WHATWG forgiving-base64 in C#
33
44The C# standard library has fast (SIMD-based) base64 encoding functions, but it lacks
5- base64 decoding function. The initial work that lead to the fast functions in the runtime
6- was carried out by [ gfoidl] ( https://github.com/gfoidl/Base64 ) .
5+ really fast base64 decoding function. The initial work that lead to the fast functions in the runtime
6+ was carried out by [ gfoidl] ( https://github.com/gfoidl/Base64 ) .
7+
8+ - There are accelerated base64 functions for UTF-8 inputs in the .NET runtime, but they are not optimal:
9+ we can make them 50% to 2x or 3x faster.
10+ - There is no accelerated base64 functions for UTF-16 inputs (e.g., ` string ` types). We can be 2x faster
11+ or more.
712
813The goal of this project is to provide the fast WHATWG forgiving-base64 algorithm already
9- used in major JavaScript runtimes (Node.js and Bun) to C#. It would complete the existing work.
14+ used in major JavaScript runtimes (Node.js and Bun) to C#.
15+
16+ Importantly, we only focus on base64 decoding. It is a more challenging problem than base64 encoding because
17+ of the presence of allowable white space characters and the need to validate the input. Indeed, all
18+ inputs are valid for encoding, but only some inputs are valid for decoding. Having to skip white space
19+ characters makes accelerated decoding somewhat difficult.
1020
1121
1222## Requirements
You can’t perform that action at this time.
0 commit comments