diff options
author | Luca Casonato <lucacasonato@yahoo.com> | 2021-06-05 23:10:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-05 23:10:07 +0200 |
commit | c73ef5fa143b473677d4cab069241ff018e0c971 (patch) | |
tree | f13f3ddb1741a81138240c36846e2a23fd562a02 /extensions/web/internal.d.ts | |
parent | bb0c90cadbb99784681a2acac1fd65ac7f802297 (diff) |
refactor(web): use encoding_rs for text encoding (#10844)
This commit removes all JS based text encoding / text decoding. Instead
encoding now happens in Rust via encoding_rs (already in tree). This
implementation retains stream support, but adds the last missing
encodings. We are incredibly close to 100% WPT on text encoding now.
This should reduce our baseline heap by quite a bit.
Diffstat (limited to 'extensions/web/internal.d.ts')
-rw-r--r-- | extensions/web/internal.d.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/extensions/web/internal.d.ts b/extensions/web/internal.d.ts index bfce3e1e1..ebfa0d39e 100644 --- a/extensions/web/internal.d.ts +++ b/extensions/web/internal.d.ts @@ -43,6 +43,8 @@ declare namespace globalThis { result: string; position: number; }; + forgivingBase64Encode(data: Uint8Array): string; + forgivingBase64Decode(data: string): Uint8Array; }; declare namespace mimesniff { @@ -65,9 +67,8 @@ declare namespace globalThis { }; declare var base64: { - byteLength(b64: string): number; - toByteArray(b64: string): Uint8Array; - fromByteArray(uint8: Uint8Array): string; + atob(data: string): string; + btoa(data: string): string; }; } } |