Skip to content

Commit 4b822e7

Browse files
committed
doc: add some badges, update sizes
1 parent 8b4a0e5 commit 4b822e7

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# `@exodus/bytes`
22

3+
[![](https://flat.badgen.net/npm/v/@exodus/bytes)](https://npmjs.org/package/@exodus/bytes)
4+
![](https://flat.badgen.net/npm/dm/@exodus/bytes)
5+
[![](https://flat.badgen.net/npm/license/@exodus/bytes)](https://github.com/ExodusOSS/bytes/blob/HEAD/LICENSE)
6+
37
`Uint8Array` conversion to and from `base64`, `base32`, `base58`, `hex`, `utf8`, `utf16`, `bech32` and `wif`
48

59
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
3842
Also [much faster](#fast) than all of those.
3943

4044
> [!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.
4246

4347
Spec compliant, passing WPT and covered with extra tests.\
4448
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'
8185
import { TextDecoderStream, TextEncoderStream } from '@exodus/bytes/encoding-lite.js' // Requires Streams
8286
```
8387

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):
8791

8892
It still supports `utf-8`, `utf-16le`, `utf-16be` and all single-byte encodings specified by the spec,
8993
the only difference is support for legacy multi-byte encodings.

0 commit comments

Comments
 (0)