|
1 | 1 | # `@exodus/bytes` |
2 | 2 |
|
| 3 | +[](https://npmjs.org/package/@exodus/bytes) |
| 4 | + |
| 5 | +[](https://github.com/ExodusOSS/bytes/blob/HEAD/LICENSE) |
| 6 | + |
3 | 7 | `Uint8Array` conversion to and from `base64`, `base32`, `base58`, `hex`, `utf8`, `utf16`, `bech32` and `wif` |
4 | 8 |
|
5 | 9 | And a [`TextEncoder` / `TextDecoder` polyfill](#textencoder--textdecoder-polyfill) |
@@ -38,7 +42,7 @@ Less than half the bundle size of [text-encoding](https://npmjs.com/text-encodin |
38 | 42 | Also [much faster](#fast) than all of those. |
39 | 43 |
|
40 | 44 | > [!TIP] |
41 | | -> See also the [lite version](#lite-version) to get this down to 9 KiB gzipped. |
| 45 | +> See also the [lite version](#lite-version) to get this down to 10 KiB gzipped. |
42 | 46 |
|
43 | 47 | Spec compliant, passing WPT and covered with extra tests.\ |
44 | 48 | Moreover, tests for this library uncovered [bugs in all major implementations](https://docs.google.com/spreadsheets/d/1pdEefRG6r9fZy61WHGz0TKSt8cO4ISWqlpBN5KntIvQ/edit).\ |
@@ -81,9 +85,9 @@ import { TextDecoder, TextEncoder } from '@exodus/bytes/encoding-lite.js' |
81 | 85 | import { TextDecoderStream, TextEncoderStream } from '@exodus/bytes/encoding-lite.js' // Requires Streams |
82 | 86 | ``` |
83 | 87 |
|
84 | | -This reduces the bundle size 10x:\ |
85 | | -from 90 KiB gzipped for `@exodus/bytes/encoding.js` to 9 KiB gzipped for `@exodus/bytes/encoding-lite.js`.\ |
86 | | -(For comparison, `text-encoding` module is 190 KiB gzipped, and `iconv-lite` is 194 KiB gzipped). |
| 88 | +This reduces the bundle size 9x:\ |
| 89 | +from 90 KiB gzipped for `@exodus/bytes/encoding.js` to 10 KiB gzipped for `@exodus/bytes/encoding-lite.js`.\ |
| 90 | +(For comparison, `text-encoding` module is 190 KiB gzipped, and `iconv-lite` is 194 KiB gzipped): |
87 | 91 |
|
88 | 92 | It still supports `utf-8`, `utf-16le`, `utf-16be` and all single-byte encodings specified by the spec, |
89 | 93 | the only difference is support for legacy multi-byte encodings. |
|
0 commit comments