Skip to content

Commit 28c1dd8

Browse files
committed
expanding the readme
1 parent 4227a7c commit 28c1dd8

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,21 @@
22
## Fast WHATWG forgiving-base64 in C#
33

44
The 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

813
The 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

0 commit comments

Comments
 (0)