Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update #459

Merged
merged 1 commit into from
Dec 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions doc-site/docs/FAQs/caclute-checksum-is-slow.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const rs = new RS.ReedSolomon();
const res = rs.encode(new Uint8Array(fileBuffer))
```

If the file is larger, this method may cause the page to freeze when calculating. In this case, we recommend using the worker mode:
It also supports UMD mode calls (simpler and more convenient):

```html title="core lib (UMD)"
<!-- prefetch js -->
Expand Down Expand Up @@ -74,7 +74,9 @@ If the file is larger, this method may cause the page to freeze when calculating
</body>
```

```html title="web worker (only support UMD)"
If the file is larger, this method may cause the page to freeze when calculating. We recommend using the worker mode:

```html title="webworker (only support UMD)"
<!-- prefetch js -->
<link rel="prefetch" href="https://unpkg.com/@bnb-chain/reed-solomon/dist/web.adapter.aio.js" />
<link rel="prefetch" href="https://unpkg.com/@bnb-chain/reed-solomon/dist/utils.aio.js" />
Expand Down Expand Up @@ -124,7 +126,7 @@ If the file is larger, this method may cause the page to freeze when calculating
</TabItem>
<TabItem value="nodejs" label="Nodejs">

Nodejs can also be used in two ways, directly with core library, or with [worker_threads](https://nodejs.org/api/worker_threads.html) (when calculating large files).
Nodejs can also be used in two ways, directly with core library, or with [worker_threads](https://nodejs.org/api/worker_threads.html) (calculating large files).

```js title="core lib"
const { ReedSolomon } = require('@bnb-chain/reed-solomon')
Expand Down
Loading